1#ifndef TGBOT_HTTPCLIENT_H
2#define TGBOT_HTTPCLIENT_H
29 virtual std::string
makeRequest(
const Url& url,
const std::vector<HttpReqArg>& args)
const = 0;
31 std::int32_t _timeout = 25;
37 return requestMaxRetries;
44 return requestBackoff;
48 int requestMaxRetries = 3;
49 int requestBackoff = 1;
This class makes http requests.
virtual ~HttpClient()=default
virtual std::string makeRequest(const Url &url, const std::vector< HttpReqArg > &args) const =0
Sends a request to the url.
virtual int getRequestBackoff() const
Get the makeRequest() backoff duration between retries, in seconds.
virtual int getRequestMaxRetries() const
Get the maximum number of makeRequest() retries before giving up and throwing an exception.
This class parses a string with the url.