cpp-ipfs-http-client
IPFS C++ client library
|
Convenience class for talking basic HTTP, implemented using CURL. More...
#include <ipfs/http/transport-curl.h>
Public Member Functions | |
TransportCurl () | |
Constructor. More... | |
~TransportCurl () | |
Destructor. More... | |
void | Fetch (const std::string &url, const std::vector< FileUpload > &files, std::iostream *response) override |
Fetch the contents of a given URL. More... | |
void | UrlEncode (const std::string &raw, std::string *encoded) override |
URL encode a string. More... | |
void | Test () |
Test the internals that are hard to execute from the public API, like error handling of some exceptional cases. More... | |
![]() | |
virtual | ~Transport () |
Destructor. More... | |
Convenience class for talking basic HTTP, implemented using CURL.
ipfs::http::TransportCurl::TransportCurl | ( | ) |
Constructor.
ipfs::http::TransportCurl::~TransportCurl | ( | ) |
Destructor.
|
overridevirtual |
Fetch the contents of a given URL.
If any files are provided in files
, they are submitted using "Content-Type: multipart/form-data".
std::exception | if any error occurs including erroneous HTTP status code |
[in] | url | URL to get. |
[in] | files | List of files to upload. |
[out] | response | Output to save the response body to. |
Implements ipfs::http::Transport.
void ipfs::http::TransportCurl::Test | ( | ) |
Test the internals that are hard to execute from the public API, like error handling of some exceptional cases.
|
overridevirtual |
URL encode a string.
[in] | raw | Input string to encode. |
[out] | encoded | URL encoded result. |
Implements ipfs::http::Transport.