10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
LibCurlHTTPClient Class Reference

#include <LibcurlHTTPClient.h>

Detailed Description

LibCurl -based implementation of HTTPClient.

Very simple currently, does not support all variations.

Inheritance diagram for 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
Public Member Functions inherited from tenduke::http::HTTPClient
virtual std::unique_ptr< tenduke::http::HTTPCall > call (std::shared_ptr< const tenduke::http::HTTPRequest > request) const =0
 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

◆ request()

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