restclient-cpp
C++ client for making HTTP/REST requests
Namespaces | Classes | Typedefs | Functions
RestClient Namespace Reference

namespace for all RestClient definitions More...

Namespaces

 Helpers
 : namespace for all helper functions
 

Classes

class  Connection
 Connection object for advanced usage. More...
 
struct  Response
 This structure represents the HTTP response data. More...
 

Typedefs

typedef std::map< std::string, std::string > HeaderFields
 

Functions

int init ()
 global init function. Call this before you start any threads.
 
void disable ()
 global disable function. Call this before you terminate your program.
 
Response get (const std::string &url)
 HTTP GET method. More...
 
Response post (const std::string &url, const std::string &content_type, const std::string &data)
 HTTP POST method. More...
 
Response put (const std::string &url, const std::string &content_type, const std::string &data)
 HTTP PUT method. More...
 
Response del (const std::string &url)
 HTTP DELETE method. More...
 
Response head (const std::string &url)
 HTTP HEAD method. More...
 

Detailed Description

namespace for all RestClient definitions

Typedef Documentation

typedef std::map<std::string, std::string> RestClient::HeaderFields

public data definitions

Function Documentation

RestClient::Response RestClient::del ( const std::string &  url)

HTTP DELETE method.

Parameters
urlto query
Returns
response struct
RestClient::Response RestClient::get ( const std::string &  url)

HTTP GET method.

public methods for the simple API. These don't allow a lot of configuration but are meant for simple HTTP calls.

Parameters
urlto query
Returns
response struct
RestClient::Response RestClient::head ( const std::string &  url)

HTTP HEAD method.

Parameters
urlto query
Returns
response struct
RestClient::Response RestClient::post ( const std::string &  url,
const std::string &  ctype,
const std::string &  data 
)

HTTP POST method.

Parameters
urlto query
ctypecontent type as string
dataHTTP POST body
Returns
response struct
RestClient::Response RestClient::put ( const std::string &  url,
const std::string &  ctype,
const std::string &  data 
)

HTTP PUT method.

Parameters
urlto query
ctypecontent type as string
dataHTTP PUT body
Returns
response struct