Helper class for sending different HTTP/HTTPS requests.
More...
#include <r5net.h>
|
static NetError | Get (Protocol protocol, const std::string &host, int port, const std::string &path, r5::common::ILoggerPtr logger=nullptr, HttpRequest *req=nullptr, HttpResponse *resp=nullptr) |
| Send HTTP GET request to server. More...
|
|
static NetError | Post (Protocol protocol, const std::string &host, int port, const std::string &path, r5::common::ILoggerPtr logger=nullptr, HttpRequest *req=nullptr, HttpResponse *resp=nullptr) |
| Send HTTP GET request to server. More...
|
|
static NetError | Put (Protocol protocol, const std::string &host, int port, const std::string &path, r5::common::ILoggerPtr logger=nullptr, HttpRequest *req=nullptr, HttpResponse *resp=nullptr) |
| Send HTTP GET request to server. More...
|
|
static NetError | Delete (Protocol protocol, const std::string &host, int port, const std::string &path, r5::common::ILoggerPtr logger=nullptr, HttpRequest *req=nullptr, HttpResponse *resp=nullptr) |
| Send HTTP GET request to server. More...
|
|
Helper class for sending different HTTP/HTTPS requests.
◆ Delete()
static NetError r5::net::HttpClient::Delete |
( |
Protocol |
protocol, |
|
|
const std::string & |
host, |
|
|
int |
port, |
|
|
const std::string & |
path, |
|
|
r5::common::ILoggerPtr |
logger = nullptr , |
|
|
HttpRequest * |
req = nullptr , |
|
|
HttpResponse * |
resp = nullptr |
|
) |
| |
|
static |
Send HTTP GET request to server.
- Parameters
-
protocol | Protocol for connection |
host | IP or name of server |
port | Port for connection |
path | Path to resource on server |
logger | Logger implementation |
req | Input request description |
resp | Output response description |
- Returns
- NetError code
◆ Get()
static NetError r5::net::HttpClient::Get |
( |
Protocol |
protocol, |
|
|
const std::string & |
host, |
|
|
int |
port, |
|
|
const std::string & |
path, |
|
|
r5::common::ILoggerPtr |
logger = nullptr , |
|
|
HttpRequest * |
req = nullptr , |
|
|
HttpResponse * |
resp = nullptr |
|
) |
| |
|
static |
Send HTTP GET request to server.
- Parameters
-
protocol | Protocol for connection |
host | IP or name of server |
port | Port for connection |
path | Path to resource on server |
logger | Logger implementation |
req | Input request description |
resp | Output response description |
- Returns
- NetError code
◆ Post()
static NetError r5::net::HttpClient::Post |
( |
Protocol |
protocol, |
|
|
const std::string & |
host, |
|
|
int |
port, |
|
|
const std::string & |
path, |
|
|
r5::common::ILoggerPtr |
logger = nullptr , |
|
|
HttpRequest * |
req = nullptr , |
|
|
HttpResponse * |
resp = nullptr |
|
) |
| |
|
static |
Send HTTP GET request to server.
- Parameters
-
protocol | Protocol for connection |
host | IP or name of server |
port | Port for connection |
path | Path to resource on server |
logger | Logger implementation |
req | Input request description |
resp | Output response description |
- Returns
- NetError code
◆ Put()
static NetError r5::net::HttpClient::Put |
( |
Protocol |
protocol, |
|
|
const std::string & |
host, |
|
|
int |
port, |
|
|
const std::string & |
path, |
|
|
r5::common::ILoggerPtr |
logger = nullptr , |
|
|
HttpRequest * |
req = nullptr , |
|
|
HttpResponse * |
resp = nullptr |
|
) |
| |
|
static |
Send HTTP GET request to server.
- Parameters
-
protocol | Protocol for connection |
host | IP or name of server |
port | Port for connection |
path | Path to resource on server |
logger | Logger implementation |
req | Input request description |
resp | Output response description |
- Returns
- NetError code
The documentation for this class was generated from the following file: