20#ifndef IPFS_HTTP_TRANSPORT_H
21#define IPFS_HTTP_TRANSPORT_H
60 virtual std::unique_ptr<Transport>
Clone()
const = 0;
74 const std::string& url,
76 const std::vector<FileUpload>& files,
78 std::iostream* response) = 0;
103 const std::string& raw,
105 std::string* encoded) = 0;
Convenience interface for talking basic HTTP.
Definition transport.h:54
virtual void Fetch(const std::string &url, const std::vector< FileUpload > &files, std::iostream *response)=0
Fetch the contents of a given URL.
virtual void ResetFetch()=0
Reset the internal state, after StopFetch() is called.
virtual ~Transport()
Destructor.
Definition transport.h:108
virtual void StopFetch()=0
Stop the Fetch method abruptly.
virtual std::unique_ptr< Transport > Clone() const =0
Return a deep copy of this object.
virtual void UrlEncode(const std::string &raw, std::string *encoded)=0
URL encode a string.
IPFS namespace.
Definition client.h:33
HTTP file upload.
Definition transport.h:33
Type
The type of the data member.
Definition transport.h:35
@ kFileName
File whose contents is streamed to the web server.
@ kFileContents
The file contents, put into a string by the caller.
const std::string path
File name to pretend to the web server.
Definition transport.h:43
const std::string data
The data to be added.
Definition transport.h:50
Type type
The type of the data member.
Definition transport.h:46