# pion::net::HTTPRequest Class Reference

`#include <HTTPRequest.hpp>`

Inherits pion::net::HTTPMessage.

List of all members.

## Detailed Description

HTTPRequest: container for HTTP request information

Definition at line 25 of file HTTPRequest.hpp.

## Public Member Functions

| HTTPRequest (const std::string &resource)
| HTTPRequest (void)
| constructs a new HTTPRequest object (default constructor)
virtual | ~HTTPRequest ()
| virtual destructor
virtual void | clear (void)
| clears all request data
virtual bool | isContentLengthImplied (void) const
| the content length of the message can never be implied for requests
const std::string & | getMethod (void) const
| returns the request method (i.e. GET, POST, PUT)
const std::string & | getResource (void) const
| returns the resource uri-stem to be delivered (possibly the result of a redirect)
const std::string & | getOriginalResource (void) const
| returns the resource uri-stem originally requested
const std::string & | getQueryString (void) const
| returns the uri-query or query string requested
const std::string & | getQuery (const std::string &key) const
| returns a value for the query key if any are defined; otherwise, an empty string
QueryParams & | getQueryParams (void)
| returns the query parameters
bool | hasQuery (const std::string &key) const
| returns true if at least one value for the query key is defined
void | setMethod (const std::string &str)
| sets the HTTP request method (i.e. GET, POST, PUT)
void | setResource (const std::string &str)
| sets the resource or uri-stem originally requested
void | changeResource (const std::string &str)
| changes the resource or uri-stem to be delivered (called as the result of a redirect)
void | setQueryString (const std::string &str)
| sets the uri-query or query string requested
void | addQuery (const std::string &key, const std::string &value)
| adds a value for the query key
void | changeQuery (const std::string &key, const std::string &value)
| changes the value of a query key
void | deleteQuery (const std::string &key)
| removes all values for a query key
void | useQueryParamsForQueryString (void)
| use the query parameters to build a query string for the request
void | useQueryParamsForPostContent (void)
| use the query parameters to build POST content for the request
void | setContent (const std::string &value)
| add content (for POST) from string
void | setUser (PionUserPtr user)
| sets the user record for HTTP request after authentication
PionUserPtr | getUser () const
| get the user record for HTTP request after authentication

## Protected Member Functions

virtual void | updateFirstLine (void) const
| updates the string containing the first line for the HTTP message

## Constructor & Destructor Documentation

pion::net::HTTPRequest::HTTPRequest | ( | const std::string & | resource | ) | `[inline]`

constructs a new HTTPRequest object

Parameters:

  | resource | the HTTP resource to request

Definition at line 35 of file HTTPRequest.hpp.

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

- net/include/pion/net/HTTPRequest.hpp