1 #ifndef _HTTP_REQUEST_H_ 2 #define _HTTP_REQUEST_H_ 57 this->protocol = protocol;
67 bool Parse(
const string& line);
75 istringstream uri_str(uri);
76 getline(uri_str,
object,
'?');
77 ParseParameters(uri_str);
84 virtual void ParseParameters(istream& stream);
92 virtual void ParseParameter(istream& stream,
const string& param,
string& value);
Type type
Request type (GET or POST)
Definition: request.h:39
map< string, string > parameters
Map with all the parameters when using the CGI form.
Definition: request.h:46
void ParseURI(const string &uri)
Parses a URI from a string.
Definition: request.h:73
Contains the definition of a set of classes for working easily with the protocol HTTP.
Definition: header.cc:4
Class used to identify the HTTP protocol.
Definition: protocol.h:20
string object
Object associated to the request.
Definition: request.h:40
Type
Request type enumeration.
Definition: request.h:33
Protocol protocol
Protocol version used.
Definition: request.h:41
Request(Type type=Request::GET, const string &uri="/", const Protocol &protocol=Protocol(1, 1))
Initializes the request.
Definition: request.h:54
Class used to identify a HTTP request (GET or POST).
Definition: request.h:27
istream & operator>>(istream &in, Request &request)
Definition: request.cc:51
ostream & operator<<(ostream &out, const Request &request)
Definition: request.cc:65