tgbot-cpp
|
#include <HttpClient.h>
Public Member Functions | |
std::string | makeRequest (const Url &url, const std::vector< HttpReqArg > &args) |
Static Public Member Functions | |
static HttpClient & | getInstance () |
This class makes http requests.
Definition at line 40 of file HttpClient.h.
|
static |
Returns instance which lives during all application lifetime.
std::string TgBot::HttpClient::makeRequest | ( | const Url & | url, |
const std::vector< HttpReqArg > & | args | ||
) |
Sends a request to the url. If there's no args specified, a GET request will be sent, otherwise a POST request will be sent. If at least 1 arg is marked as file, the content type of a request will be multipart/form-data, otherwise it will be application/x-www-form-urlencoded.