ESA JPIP server
0.1
|
Class used to identify a HTTP request (GET or POST). More...
#include <request.h>
Public Types | |
enum | Type { GET, POST, UNKNOWN } |
Request type enumeration. More... | |
Public Member Functions | |
Request (Type type=Request::GET, const string &uri="/", const Protocol &protocol=Protocol(1, 1)) | |
Initializes the request. More... | |
bool | Parse (const string &line) |
Parses a request from a string. More... | |
void | ParseURI (const string &uri) |
Parses a URI from a string. More... | |
virtual void | ParseParameters (istream &stream) |
Parses the parameters from an input stream. More... | |
virtual void | ParseParameter (istream &stream, const string ¶m, string &value) |
Parses one parameter from an input stream. More... | |
Public Attributes | |
Type | type |
Request type (GET or POST) More... | |
string | object |
Object associated to the request. More... | |
Protocol | protocol |
Protocol version used. More... | |
map< string, string > | parameters |
Map with all the parameters when using the CGI form. More... | |
Friends | |
istream & | operator>> (istream &in, Request &request) |
ostream & | operator<< (ostream &out, const Request &request) |
Class used to identify a HTTP request (GET or POST).
It is possible to use this class with standard streams.
enum http::Request::Type |
Request type enumeration.
Enumerator | |
---|---|
GET | |
POST | |
UNKNOWN |
|
inline |
bool http::Request::Parse | ( | const string & | line | ) |
Parses a request from a string.
line | String that contains the request to parse. |
true
if successful.
|
virtual |
Parses one parameter from an input stream.
stream | Input stream. |
param | Parameter name. |
value | Parameter value. |
Reimplemented in jpip::Request.
|
virtual |
Parses the parameters from an input stream.
stream | Input stream. |
Reimplemented in jpip::Request.
|
inline |
Parses a URI from a string.
uri | String that contains the URI to parse. |
|
friend |
|
friend |
string http::Request::object |
Object associated to the request.
map<string, string> http::Request::parameters |
Map with all the parameters when using the CGI form.