1#ifndef TENDUKE_HTTP_LIBCURLHTTPCALL_H
2#define TENDUKE_HTTP_LIBCURLHTTPCALL_H
4#include "http/HTTPCall.h"
5#include "http/HTTPRequest.h"
6#include "http/HTTPResponse.h"
10namespace tenduke {
namespace http {
namespace curl {
27 std::shared_ptr<const tenduke::http::HTTPRequest>
request,
36 std::unique_ptr<tenduke::http::HTTPResponse>
execute()
override;
60 const std::shared_ptr<const tenduke::http::HTTPRequest>
request;
63 const std::unique_ptr<CURL,
decltype(curl_easy_cleanup) *>
curlHandle;
HTTP-call which executes the request and returns HTTPResponse.
Definition HTTPCall.h:15
LibCurl-based implementation of tenduke::http::HTTPCall.
Definition LibcurlHTTPCall.h:17
virtual void setRequestMethod()
Sets request method to the CURL-call.
Definition LibcurlHTTPCall.cpp:272
virtual void setRequestBody()
Sets request body to the CURL-call.
Definition LibcurlHTTPCall.cpp:281
const std::unique_ptr< CURL, decltype(curl_easy_cleanup) * > curlHandle
libcurl-handle for the request.
Definition LibcurlHTTPCall.h:63
bool verbose
If true, configure libcurl to provide verbose output.
Definition LibcurlHTTPCall.h:76
virtual void setUrl()
Sets URL to the CURL-call.
Definition LibcurlHTTPCall.cpp:263
const std::shared_ptr< const tenduke::http::HTTPRequest > request
The request.
Definition LibcurlHTTPCall.h:60
virtual void setRequestHeaders()
Sets request headers to the CURL-call.
Definition LibcurlHTTPCall.cpp:292
bool blindlyTrustSSLCertificates
If true, configure libcurl to blindly trust all SSL certificates.
Definition LibcurlHTTPCall.h:73
struct curl_slist * curlHeaders
libcurl header-list.
Definition LibcurlHTTPCall.h:66
std::unique_ptr< tenduke::http::HTTPResponse > execute() override
Executes the call synchronously.
Definition LibcurlHTTPCall.cpp:191
const std::string userAgent
Useragent-string to use.
Definition LibcurlHTTPCall.h:70
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4