10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
tenduke::http::curl::LibCurlHTTPClient Class Reference

#include <LibcurlHTTPClient.h>

Detailed Description

LibCurl -based implementation of HTTPClient.

Very simple currently, does not support all variations.

Inheritance diagram for tenduke::http::curl::LibCurlHTTPClient:
tenduke::http::HTTPClient

Public Member Functions

 LibCurlHTTPClient (std::string userAgent={}, long defaultConnectionTimeoutMs=DEFAULT_CONNECTION_TIMEOUT_MS, long defaultTimeoutMs=DEFAULT_TIMEOUT_MS, bool verbose=false, std::size_t maxResponseBodySize=DEFAULT_MAX_RESPONSE_BODY_SIZE)
 Constructs instance with LibCurlURLEncoder.
tenduke::http::HTTPRequestBuilder request () const override
 Starts building request.
std::unique_ptr< tenduke::http::HTTPCall > call (std::shared_ptr< const tenduke::http::HTTPRequest > request) const override
 Creates new HTTPCall from given HTTPRequest.

Constructor & Destructor Documentation

◆ LibCurlHTTPClient()

tenduke::http::curl::LibCurlHTTPClient::LibCurlHTTPClient ( std::string userAgent = {},
long defaultConnectionTimeoutMs = DEFAULT_CONNECTION_TIMEOUT_MS,
long defaultTimeoutMs = DEFAULT_TIMEOUT_MS,
bool verbose = false,
std::size_t maxResponseBodySize = DEFAULT_MAX_RESPONSE_BODY_SIZE )
explicit

Constructs instance with LibCurlURLEncoder.

Parameters
userAgent-
defaultConnectionTimeoutMsconnection timeout, 0 for the libcurl default (300 seconds)
defaultTimeoutMstotal timeout of a request, 0 for no timeout
verbose-
maxResponseBodySizemaximum size of a response body in bytes, a larger response is aborted

Member Function Documentation

◆ call()

std::unique_ptr< xdhttp::HTTPCall > tenduke::http::curl::LibCurlHTTPClient::call ( std::shared_ptr< const tenduke::http::HTTPRequest > request) const
overridevirtual

Creates new HTTPCall from given HTTPRequest.

Parameters
request-
Returns
-

Implements tenduke::http::HTTPClient.

◆ request()

xdhttp::HTTPRequestBuilder tenduke::http::curl::LibCurlHTTPClient::request ( ) const
overridevirtual

Starts building request.

Implements tenduke::http::HTTPClient.


The documentation for this class was generated from the following files:
  • core/services/default/src/http/LibcurlHTTPClient.h
  • core/services/default/src/http/LibcurlHTTPClient.cpp