tgbot-cpp
TgBot::HttpClient Class Reference

#include <HttpClient.h>

Public Member Functions

std::string makeRequest (const Url &url, const std::vector< HttpReqArg > &args)
 

Static Public Member Functions

static HttpClientgetInstance ()
 

Detailed Description

This class makes http requests.

Definition at line 40 of file HttpClient.h.

Member Function Documentation

◆ getInstance()

static HttpClient& TgBot::HttpClient::getInstance ( )
static

Returns instance which lives during all application lifetime.

◆ makeRequest()

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: