#include <curlTransport.hpp>
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 () |
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.
|
explicit |
CurlTransport constructor
| config | the configuration |
| anch::rest::TransportError | when curl can not be initialized |
|
delete |
|
virtual |
CurlTransport destructor
|
delete |
|
overridevirtual |
Send request with curl
| url | the request URL |
| request | the request |
| anch::rest::TransportError | when request fails |
Implements anch::rest::Transport.