1#ifndef TENDUKE_HTTP_LIBCURLHTTPCLIENT_H
2#define TENDUKE_HTTP_LIBCURLHTTPCLIENT_H
4#include "http/HTTPClient.h"
5#include "net/URLEncoder.h"
7namespace tenduke {
namespace http {
namespace curl {
25 std::string userAgent = {},
28 bool blindlyTrustSSLCertificates =
false,
42 std::shared_ptr<const tenduke::net::URLEncoder> urlEncoder,
43 std::string userAgent = {},
46 bool blindlyTrustSSLCertificates =
false,
55 std::unique_ptr<tenduke::http::HTTPCall>
call(std::shared_ptr<const tenduke::http::HTTPRequest>
request)
const override;
58 const std::shared_ptr<const tenduke::net::URLEncoder> urlEncoder;
59 const long defaultConnectionTimeoutMs;
60 const long defaultTimeoutMs;
61 const std::string userAgent;
62 const bool blindlyTrustSSLCertificates;
A simple HTTP-client.
Definition HTTPClient.h:19
Builds HTTPRequest.
Definition HTTPRequestBuilder.h:22
LibCurl -based implementation of HTTPClient.
Definition LibcurlHTTPClient.h:14
LibCurlHTTPClient(std::shared_ptr< const tenduke::net::URLEncoder > urlEncoder, std::string userAgent={}, long defaultConnectionTimeoutMs=DEFAULT_CONNECTION_TIMEOUT_MS, long defaultTimeoutMs=DEFAULT_TIMEOUT_MS, bool blindlyTrustSSLCertificates=false, bool verbose=false)
Constructs instance with given URLEncoder.
std::unique_ptr< tenduke::http::HTTPCall > call(std::shared_ptr< const tenduke::http::HTTPRequest > request) const override
Creates new HTTPCall from given HTTPRequest.
Definition LibcurlHTTPClient.cpp:63
tenduke::http::HTTPRequestBuilder request() const override
Starts building request.
Definition LibcurlHTTPClient.cpp:53
const long DEFAULT_CONNECTION_TIMEOUT_MS
Default connection time out in milliseconds.
Definition HTTPRequest.h:13
const long DEFAULT_TIMEOUT_MS
Default total time out in milliseconds.
Definition HTTPRequest.h:16
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4