Web framework C++  2.0.0
Simple web framework on c++ designed to easily create web pages, etc
Public Member Functions | List of all members
Request Class Reference

class wrapper of HTTP request More...

#include <request.h>

Collaboration diagram for Request:
Collaboration graph

Public Member Functions

 Request ()
 
 Request (HTTP::Method method, std::string &URI, HTTP::Version version, std::string &headers, std::string &body, std::string raw)
 
 ~Request ()
 
HTTP::Method getMethod ()
 
URIgetURI ()
 
HTTP::Version getVersion ()
 
HeadersgetHeaders ()
 
MessageBodygetMessageBody ()
 
std::string getRawData ()
 

Detailed Description

class wrapper of HTTP request

Object of this class is deserialized http request, where all consisting data is represented by objects of another classes

Constructor & Destructor Documentation

Request::Request ( )

Makes empty Request object, where method and version is undefined

Request::Request ( HTTP::Method  method,
std::string &  URI,
HTTP::Version  version,
std::string &  headers,
std::string &  body,
std::string  raw 
)

Makes Request object with declared arguments

Parameters
methodhttp method of request
URIhttp request uri string, which is used to construct URI object
versionrequest http version
headershttp request headers string, which is used to construct Headers object
bodyhttp request body string, which is used to construct MessageBody object
Request::~Request ( )

deletes URI, Headers and MessageBody objects

Member Function Documentation

Headers* Request::getHeaders ( )

get request headers

Returns
Headers request object
MessageBody* Request::getMessageBody ( )

get request body

Returns
MessageBody request object
HTTP::Method Request::getMethod ( )

get request method

Returns
value of enum HTTP::Method, which represents http method.
std::string Request::getRawData ( )
URI* Request::getURI ( )

get URI request object

Returns
request URI object
HTTP::Version Request::getVersion ( )

get http version of request

Returns
value of enum HTTP:Version, which represents http version.

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