20#ifndef IPFS_HTTP_TRANSPORT_CURL_H
21#define IPFS_HTTP_TRANSPORT_CURL_H
24#include <ipfs/http/transport.h>
69 std::unique_ptr<Transport>
Clone()
const override;
83 const std::string& url,
85 const std::vector<FileUpload>& files,
87 std::iostream* response)
override;
113 const std::string& raw,
115 std::string* encoded)
override;
130 const std::string& url,
132 std::iostream* response);
138 std::atomic<bool> keep_perform_running_;
141 CURLcode global_init_result_;
147 CURLM* multi_handle_;
153 bool url_encode_injected_failure =
false;
156 bool perform_injected_failure =
false;
Convenience class for talking basic HTTP, implemented using CURL.
Definition transport-curl.h:36
~TransportCurl()
Destructor.
Definition transport-curl.cc:161
void ResetFetch() override
Reset the internal state, after StopFetch() is called.
Definition transport-curl.cc:250
void StopFetch() override
Stop the fetch method abruptly, useful whenever the Fetch method is used within a thead,...
Definition transport-curl.cc:248
void Test()
Test the internals that are hard to execute from the public API, like error handling of some exceptio...
Definition transport-curl.cc:372
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:170
TransportCurl & operator=(const TransportCurl &)
Copy assignment operator.
Definition transport-curl.cc:133
void UrlEncode(const std::string &raw, std::string *encoded) override
URL encode a string.
Definition transport-curl.cc:252
std::unique_ptr< Transport > Clone() const override
Return a deep copy of this object.
Definition transport-curl.cc:157
Convenience interface for talking basic HTTP.
Definition transport.h:54
IPFS namespace.
Definition client.h:33