EHS Embedded HTTP Server
1.5.1.0
|
This class represents a clients HTTP request. More...
#include <httprequest.h>
Public Member Functions | |
virtual | ~HttpRequest () |
Destructor. | |
std::string | RemoteAddress () |
Retrieves the peer's IP address. More... | |
int | RemotePort () |
Retrieves the peer's port. More... | |
std::string | LocalAddress () |
Retrieves the local IP address. More... | |
int | LocalPort () |
Retrieves the local port. More... | |
std::string | Address () |
Retrieves the peer's IP address. More... | |
int | Port () |
Retrieves the peer's port. More... | |
int | Id () const |
Retrieves this request's Id. More... | |
EHSConnection * | Connection () const |
Retrieves the receiving connection. More... | |
RequestMethod | Method () const |
Retrieves the request method. More... | |
bool | Secure () const |
Retrieves the security status. More... | |
bool | ClientDisconnected () |
Retrieves the client connection status. More... | |
const std::string & | Uri () const |
Retrieves this request's URI. More... | |
const std::string & | HttpVersion () const |
Retrieves the HTTP version. More... | |
const std::string & | Body () const |
Retrieves this request's body. More... | |
StringCaseMap & | Headers () |
Retrieves HTTP headers. More... | |
FormValueMap & | FormValues () |
Retrieves form values. More... | |
CookieMap & | Cookies () |
Retrieves cookies. More... | |
FormValue & | FormValues (const std::string &name) |
Retrieves a specific form value. More... | |
std::string | Headers (const std::string &name) |
Retrieves a specific HTTP header. More... | |
void | SetHeader (const std::string &name, const std::string &value) |
Sets a single request header. More... | |
std::string | Cookies (const std::string &name) |
Retrieves a specific cookie value. More... | |
Friends | |
class | EHSConnection |
class | EHS |
This class represents a clients HTTP request.
It contans pre-parsed data like cookies, form data and header information.
Definition at line 51 of file httprequest.h.
|
inline |
Retrieves the peer's IP address.
Definition at line 99 of file httprequest.h.
References RemoteAddress().
|
inline |
Retrieves this request's body.
Definition at line 155 of file httprequest.h.
bool ClientDisconnected | ( | ) |
Retrieves the client connection status.
|
inline |
Retrieves the receiving connection.
Definition at line 119 of file httprequest.h.
|
inline |
Retrieves cookies.
Definition at line 173 of file httprequest.h.
|
inline |
Retrieves a specific cookie value.
name | The name of the cookie to be retrieved. |
Definition at line 215 of file httprequest.h.
|
inline |
Retrieves form values.
Definition at line 167 of file httprequest.h.
|
inline |
Retrieves a specific form value.
name | The name of the form element to be retrieved. |
Definition at line 180 of file httprequest.h.
|
inline |
Retrieves HTTP headers.
Definition at line 161 of file httprequest.h.
|
inline |
Retrieves a specific HTTP header.
name | The name of the HTTP header to be retrieved. |
Definition at line 190 of file httprequest.h.
|
inline |
Retrieves the HTTP version.
Definition at line 149 of file httprequest.h.
|
inline |
Retrieves this request's Id.
Definition at line 113 of file httprequest.h.
std::string LocalAddress | ( | ) |
Retrieves the local IP address.
int LocalPort | ( | ) |
Retrieves the local port.
|
inline |
Retrieves the request method.
Definition at line 125 of file httprequest.h.
|
inline |
Retrieves the peer's port.
Definition at line 107 of file httprequest.h.
References RemotePort().
std::string RemoteAddress | ( | ) |
Retrieves the peer's IP address.
Referenced by Address().
int RemotePort | ( | ) |
Retrieves the peer's port.
Referenced by Port().
|
inline |
Retrieves the security status.
Definition at line 131 of file httprequest.h.
|
inline |
Sets a single request header.
This method is intended for generating synthetic headers (for example when implementing HTTP basic authentication).
name | The name of the HTTP header to be set. |
value | The value of the HTTP header to be set. |
Definition at line 205 of file httprequest.h.
|
inline |
Retrieves this request's URI.
Definition at line 143 of file httprequest.h.