tgbot-cpp
TgBot::HttpClient Class Reference

This class makes http requests. More...

#include <HttpClient.h>

Public Member Functions

std::string makeRequest (const Url &url, const std::vector< HttpReqArg > &args)
 Sends a request to the url. More...
 

Static Public Member Functions

static HttpClientgetInstance ()
 Returns instance which lives during all application lifetime. More...
 

Detailed Description

This class makes http requests.

Definition at line 41 of file HttpClient.h.

Member Function Documentation

static HttpClient& TgBot::HttpClient::getInstance ( )
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.


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