|  | Home | Documentation | HttpRequest Class Reference updated Mon Feb 22 2016 |

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes | List of all members
HttpRequest Class Reference

`#include <HttpContext.h>`

Inheritance diagram for HttpRequest:
[legend]
Collaboration diagram for HttpRequest:
[legend]

## Public Types
enum | Method { GET = 0, POST = 1 }
Public Types inherited from HttpMessage
typedef std::map< std::string, std::string, casecmpless > | ContentHeaders

## Public Member Functions
| HttpRequest ()
| constructor. More...
virtual | ~HttpRequest ()
| destructor. More...
virtual Method | getMethod () const
virtual const char * | getQueryString ()
virtual const char * | getBody ()
virtual void * | getData ()
virtual unsigned long | getContentLength () const
| return the lenght of the body of the request. More...
virtual bool | operator<< (std::istream &)
Public Member Functions inherited from HttpMessage
| HttpMessage ()
| constructor. More...
const ContentHeaders & | getContentHeaders () const
| return the content headers of the message. More...
ContentHeaders & | getContentHeaders ()
| return the content headers of the message. More...

## Public Attributes
std::string | _querystring
char * | _body
unsigned long | _contentlength
Method | _method

## Additional Inherited Members
Protected Attributes inherited from HttpMessage
ContentHeaders | m_ContentHeaders
| the content headers. More...

## Detailed Description

a HTTP request. No platform dependent types are used here, unchanged also for Apache-Server Platform dependency is in subclasses only.

## Member Enumeration Documentation

enum HttpRequest::Method

2 methods in HTTP:either GET or POST.

Enumerator
GET |
POST |

## Constructor & Destructor Documentation

HttpRequest::HttpRequest | ( |  | ) |

constructor.

HttpRequest::~HttpRequest | ( |  | ) |
| virtual

destructor.

## Member Function Documentation

const char * HttpRequest::getBody | ( |  | ) |
| virtual

Returns
  the body of the request as a string (guaranteed to be 0 terminated).

unsigned long HttpRequest::getContentLength | ( |  | ) | const
| virtual

return the lenght of the body of the request.

void * HttpRequest::getData | ( |  | ) |
| virtual

Returns
  the pointer to the start of the body data.

HttpRequest::Method HttpRequest::getMethod | ( |  | ) | const
| virtual

Returns
  the method used in the request

const char * HttpRequest::getQueryString | ( |  | ) |
| virtual

Returns
  the url requested.

bool HttpRequest::operator<< | ( | std::istream & | is | ) |
| virtual

## Member Data Documentation

char* HttpRequest::_body

unsigned long HttpRequest::_contentlength

Method HttpRequest::_method

std::string HttpRequest::_querystring

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

- HttpContext.h
- HttpContext.cpp