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
-
key | the header name |
value | the 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
-
key | the parameter name |
value | the value |
bool ola::http::HTTPRequest::CheckParameterExists |
( |
const std::string & |
key | ) |
const |
Return whether an url parameter exists
- Parameters
-
key | the 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
-
key | the 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
-
key | the 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
-
key | the 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 |
|
) |
| |
The documentation for this class was generated from the following files: