Open Lighting Architecture  0.9.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
ola::http::HTTPRequest Class Reference

Public Member Functions

 HTTPRequest (const std::string &url, const std::string &method, const std::string &version, struct MHD_Connection *connection)
bool Init ()
const std::string Url () const
const std::string Method () const
const std::string Version () const
void AddHeader (const std::string &key, const std::string &value)
void AddPostParameter (const std::string &key, const std::string &value)
void ProcessPostData (const char *data, size_t *data_size)
const std::string GetHeader (const std::string &key) const
bool CheckParameterExists (const std::string &key) const
const std::string GetParameter (const std::string &key) const
const std::string GetPostParameter (const std::string &key) const
bool InFlight () const
void SetInFlight ()

Member Function Documentation

void ola::http::HTTPRequest::AddHeader ( const std::string &  key,
const std::string &  value 
)

Add a header to the request object.

Parameters
keythe header name
valuethe value of the header
void ola::http::HTTPRequest::AddPostParameter ( const std::string &  key,
const std::string &  value 
)

Add a post parameter. This can be called multiple times and the values will be appended.

Parameters
keythe parameter name
valuethe value
bool ola::http::HTTPRequest::CheckParameterExists ( const std::string &  key) const

Return whether an url parameter exists

Parameters
keythe name of the parameter
Returns
if the parameter exists
const string ola::http::HTTPRequest::GetHeader ( const std::string &  key) const

Return the value of the header sent with this request

Parameters
keythe name of the header
Returns
the value of the header or empty string if it doesn't exist.
const string ola::http::HTTPRequest::GetParameter ( const std::string &  key) const

Return the value of a url parameter

Parameters
keythe name of the parameter
Returns
the value of the parameter
const string ola::http::HTTPRequest::GetPostParameter ( const std::string &  key) const

Lookup a post parameter in this request

Parameters
keythe name of the parameter
Returns
the value of the parameter or the empty string if it doesn't exist
void ola::http::HTTPRequest::ProcessPostData ( const char *  data,
size_t *  data_size 
)

Process post data


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