AnCH Framework 0.2
Another C++ Hack: C++23 utility libraries
Loading...
Searching...
No Matches
anch::rest::CurlTransport Class Reference

#include <curlTransport.hpp>

Inheritance diagram for anch::rest::CurlTransport:
Collaboration diagram for anch::rest::CurlTransport:

Public Member Functions

 CurlTransport (anch::rest::TransportConfig config=anch::rest::TransportConfig())
 CurlTransport (const CurlTransport &)=delete
virtual ~CurlTransport ()
virtual anch::rest::Response send (const std::string &url, const anch::rest::Request &request) override
CurlTransport & operator= (const CurlTransport &)=delete
Public Member Functions inherited from anch::rest::Transport
virtual ~Transport ()

Detailed Description

libcurl transport.
It keeps one curl handle (connections are reused between requests). Requests are serialized: a transport can be shared between threads but sends one request at a time. Request bodies are buffered before sending.

Author
Vincent Lachenal
Since
0.2

Constructor & Destructor Documentation

◆ CurlTransport() [1/2]

anch::rest::CurlTransport::CurlTransport ( anch::rest::TransportConfig config = anch::rest::TransportConfig())
explicit

CurlTransport constructor

Parameters
configthe configuration
Exceptions
anch::rest::TransportErrorwhen curl can not be initialized

◆ CurlTransport() [2/2]

anch::rest::CurlTransport::CurlTransport ( const CurlTransport & )
delete

Prohibit CurlTransport copy

Here is the call graph for this function:

◆ ~CurlTransport()

virtual anch::rest::CurlTransport::~CurlTransport ( )
virtual

CurlTransport destructor

Member Function Documentation

◆ operator=()

CurlTransport & anch::rest::CurlTransport::operator= ( const CurlTransport & )
delete

Prohibit CurlTransport copy

Here is the call graph for this function:

◆ send()

virtual anch::rest::Response anch::rest::CurlTransport::send ( const std::string & url,
const anch::rest::Request & request )
overridevirtual

Send request with curl

Parameters
urlthe request URL
requestthe request
Returns
the response
Exceptions
anch::rest::TransportErrorwhen request fails

Implements anch::rest::Transport.


The documentation for this class was generated from the following file: