Network code documentation for my turn-based game 1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
HttpInterface Class Referenceabstract

HttpInterface is an interface to perform GET and POST requests via the HTTP protocol. All requests must have a json body. More...

#include <http_interface.h>

Inheritance diagram for HttpInterface:
HttpManager

Public Member Functions

constexpr HttpInterface () noexcept=default
 
constexpr HttpInterface (HttpInterface &&other) noexcept=default
 
constexpr HttpInterfaceoperator= (HttpInterface &&other) noexcept=default
 
constexpr HttpInterface (const HttpInterface &other) noexcept=default
 
constexpr HttpInterfaceoperator= (const HttpInterface &other) noexcept=default
 
virtual ~HttpInterface () noexcept=default
 
virtual void RegisterHostAndPort (std::string_view host, Port port) noexcept=0
 
virtual std::string Get (std::string_view uri) noexcept=0
 
virtual void Post (std::string_view uri, std::string_view json_body) noexcept=0
 

Detailed Description

HttpInterface is an interface to perform GET and POST requests via the HTTP protocol. All requests must have a json body.

Constructor & Destructor Documentation

◆ HttpInterface() [1/3]

constexpr HttpInterface::HttpInterface ( )
explicitconstexprdefaultnoexcept

◆ HttpInterface() [2/3]

constexpr HttpInterface::HttpInterface ( HttpInterface && other)
constexprdefaultnoexcept

◆ HttpInterface() [3/3]

constexpr HttpInterface::HttpInterface ( const HttpInterface & other)
constexprdefaultnoexcept

◆ ~HttpInterface()

virtual HttpInterface::~HttpInterface ( )
virtualdefaultnoexcept

Member Function Documentation

◆ Get()

virtual std::string HttpInterface::Get ( std::string_view uri)
pure virtualnoexcept

Implemented in HttpManager.

◆ operator=() [1/2]

constexpr HttpInterface & HttpInterface::operator= ( const HttpInterface & other)
constexprdefaultnoexcept

◆ operator=() [2/2]

constexpr HttpInterface & HttpInterface::operator= ( HttpInterface && other)
constexprdefaultnoexcept

◆ Post()

virtual void HttpInterface::Post ( std::string_view uri,
std::string_view json_body )
pure virtualnoexcept

Implemented in HttpManager.

◆ RegisterHostAndPort()

virtual void HttpInterface::RegisterHostAndPort ( std::string_view host,
Port port )
pure virtualnoexcept

Implemented in HttpManager.


The documentation for this class was generated from the following file: