20 #ifndef IPFS_HTTP_TRANSPORT_CURL_H 21 #define IPFS_HTTP_TRANSPORT_CURL_H 23 #include <curl/curl.h> 24 #include <ipfs/http/transport.h> 50 const std::string& url,
52 const std::vector<FileUpload>& files,
54 std::iostream* response)
override;
59 const std::string& raw,
61 std::string* encoded)
override;
76 const std::string& url,
78 std::iostream* response);
90 char curl_error_[CURL_ERROR_SIZE];
93 bool url_encode_injected_failure =
false;
96 bool handle_setup_injected_failure =
false;
99 bool perform_injected_failure =
false;
TransportCurl()
Constructor.
Definition: transport-curl.cc:90
Convenience class for talking basic HTTP, implemented using CURL.
Definition: transport-curl.h:35
~TransportCurl()
Destructor.
Definition: transport-curl.cc:98
Convenience interface for talking basic HTTP.
Definition: transport.h:53
void UrlEncode(const std::string &raw, std::string *encoded) override
URL encode a string.
Definition: transport-curl.cc:180
void Fetch(const std::string &url, const std::vector< FileUpload > &files, std::iostream *response) override
Fetch the contents of a given URL.
Definition: transport-curl.cc:100
void Test()
Test the internals that are hard to execute from the public API, like error handling of some exceptio...
Definition: transport-curl.cc:276
IPFS namespace.
Definition: client.h:32