Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion::remote::HttpClient Class Reference

HttpClient is a very basic class that sends HTTP requests and returns the server's response. More...

#include "httpclient.h"

Classes

struct  Response
 
struct  Url
 Simple wrapper around a URL. More...
 

Public Member Functions

 HttpClient ()
 
virtual ~HttpClient ()
 
virtual const Response Get (const std::string &url) const
 Sends a GET request for a URL and returns the remote host's response. More...
 
virtual const Response GetRange (const std::string &url, int64 start, int64 end) const
 Sends a GET request for the passed byte range and returns the remote host's response. More...
 
virtual const Response Head (const std::string &url) const
 Sends a HEAD request for a URL and returns the remote host's response. More...
 
virtual const Response Post (const std::string &url, const std::string &data)
 POSTs data to URL and returns the remote host's response. More...
 
virtual const Response Put (const std::string &url, const std::string &data)
 PUTs data to URL and returns the remote host's response. More...
 

Detailed Description

HttpClient is a very basic class that sends HTTP requests and returns the server's response.

It is not very intelligent about parsing URLs, especially those with complex encodings, but it can handle simple GETs and the like.

Definition at line 32 of file httpclient.h.

Constructor & Destructor Documentation

ion::remote::HttpClient::HttpClient ( )

Definition at line 215 of file httpclient.cc.

ion::remote::HttpClient::~HttpClient ( )
virtual

Definition at line 218 of file httpclient.cc.

Member Function Documentation

const HttpClient::Response ion::remote::HttpClient::Get ( const std::string &  url) const
virtual

Sends a GET request for a URL and returns the remote host's response.

Definition at line 221 of file httpclient.cc.

const HttpClient::Response ion::remote::HttpClient::GetRange ( const std::string &  url,
int64  start,
int64  end 
) const
virtual

Sends a GET request for the passed byte range and returns the remote host's response.

Definition at line 225 of file httpclient.cc.

const HttpClient::Response ion::remote::HttpClient::Head ( const std::string &  url) const
virtual

Sends a HEAD request for a URL and returns the remote host's response.

Definition at line 230 of file httpclient.cc.

const HttpClient::Response ion::remote::HttpClient::Post ( const std::string &  url,
const std::string &  data 
)
virtual

POSTs data to URL and returns the remote host's response.

Definition at line 234 of file httpclient.cc.

const HttpClient::Response ion::remote::HttpClient::Put ( const std::string &  url,
const std::string &  data 
)
virtual

PUTs data to URL and returns the remote host's response.

Definition at line 239 of file httpclient.cc.


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