cpp-ipfs-http-client
IPFS C++ client library
Public Member Functions | List of all members
ipfs::http::Transport Class Referenceabstract

Convenience interface for talking basic HTTP. More...

#include <ipfs/http/transport.h>

Inheritance diagram for ipfs::http::Transport:
ipfs::http::TransportCurl

Public Member Functions

virtual ~Transport ()
 Destructor. More...
 
virtual void Fetch (const std::string &url, const std::vector< FileUpload > &files, std::iostream *response)=0
 Fetch the contents of a given URL. More...
 
virtual void UrlEncode (const std::string &raw, std::string *encoded)=0
 URL encode a string. More...
 

Detailed Description

Convenience interface for talking basic HTTP.

Constructor & Destructor Documentation

◆ ~Transport()

ipfs::http::Transport::~Transport ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ Fetch()

virtual void ipfs::http::Transport::Fetch ( const std::string &  url,
const std::vector< FileUpload > &  files,
std::iostream *  response 
)
pure virtual

Fetch the contents of a given URL.

If any files are provided in files, they are submitted using "Content-Type: multipart/form-data".

Exceptions
std::exceptionif any error occurs including erroneous HTTP status code
Parameters
[in]urlURL to get.
[in]filesList of files to upload.
[out]responseOutput to save the response body to.

Implemented in ipfs::http::TransportCurl.

◆ UrlEncode()

virtual void ipfs::http::Transport::UrlEncode ( const std::string &  raw,
std::string *  encoded 
)
pure virtual

URL encode a string.

Parameters
[in]rawInput string to encode.
[out]encodedURL encoded result.

Implemented in ipfs::http::TransportCurl.


The documentation for this class was generated from the following file: