tgbot-cpp
Loading...
Searching...
No Matches
TgBot::BoostHttpOnlySslClient Class Reference

This class makes http requests via boost::asio. More...

#include <BoostHttpOnlySslClient.h>

Inheritance diagram for TgBot::BoostHttpOnlySslClient:
TgBot::HttpClient

Public Member Functions

 BoostHttpOnlySslClient ()
 
 ~BoostHttpOnlySslClient () override
 
std::string makeRequest (const Url &url, const std::vector< HttpReqArg > &args) const override
 Sends a request to the url.
 
- Public Member Functions inherited from TgBot::HttpClient
virtual ~HttpClient ()=default
 
virtual int getRequestMaxRetries () const
 Get the maximum number of makeRequest() retries before giving up and throwing an exception.
 
virtual int getRequestBackoff () const
 Get the makeRequest() backoff duration between retries, in seconds.
 

Additional Inherited Members

- Public Attributes inherited from TgBot::HttpClient
std::int32_t _timeout = 25
 

Detailed Description

This class makes http requests via boost::asio.

Definition at line 21 of file BoostHttpOnlySslClient.h.

Constructor & Destructor Documentation

◆ BoostHttpOnlySslClient()

TgBot::BoostHttpOnlySslClient::BoostHttpOnlySslClient ( )

◆ ~BoostHttpOnlySslClient()

TgBot::BoostHttpOnlySslClient::~BoostHttpOnlySslClient ( )
override

Member Function Documentation

◆ makeRequest()

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

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.

Implements TgBot::HttpClient.


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