#include <HTTPRequest.hpp>
Inherits pion::net::HTTPMessage.
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 | |
| const std::string & | getCookie (const std::string &key) const |
| QueryParams & | getQueryParams (void) |
| returns the query parameters | |
| CookieParams & | getCookieParams (void) |
| returns the cookie parameters | |
| bool | hasQuery (const std::string &key) const |
| returns true if at least one value for the query key is defined | |
| bool | hasCookie (const std::string &key) const |
| 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 | addCookie (const std::string &key, const std::string &value) |
| void | changeCookie (const std::string &key, const std::string &value) |
| void | deleteCookie (const std::string &key) |
| 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 | |
| pion::net::HTTPRequest::HTTPRequest | ( | const std::string & | resource | ) | [inline] |
constructs a new HTTPRequest object
| resource | the HTTP resource to request |
Definition at line 35 of file HTTPRequest.hpp.
| const std::string& pion::net::HTTPRequest::getCookie | ( | const std::string & | key | ) | const [inline] |
returns a value for the cookie if any are defined; otherwise, an empty string since cookie names are insensitive, key should use lowercase alpha chars
Definition at line 79 of file HTTPRequest.hpp.
References pion::net::HTTPMessage::getValue().
| bool pion::net::HTTPRequest::hasCookie | ( | const std::string & | key | ) | const [inline] |
returns true if at least one value for the cookie is defined since cookie names are insensitive, key should use lowercase alpha chars
Definition at line 100 of file HTTPRequest.hpp.
| void pion::net::HTTPRequest::addCookie | ( | const std::string & | key, | |
| const std::string & | value | |||
| ) | [inline] |
adds a value for the cookie since cookie names are insensitive, key should use lowercase alpha chars
Definition at line 159 of file HTTPRequest.hpp.
| void pion::net::HTTPRequest::changeCookie | ( | const std::string & | key, | |
| const std::string & | value | |||
| ) | [inline] |
changes the value of a cookie since cookie names are insensitive, key should use lowercase alpha chars
Definition at line 165 of file HTTPRequest.hpp.
References pion::net::HTTPMessage::changeValue().
| void pion::net::HTTPRequest::deleteCookie | ( | const std::string & | key | ) | [inline] |
removes all values for a cookie since cookie names are insensitive, key should use lowercase alpha chars
Definition at line 171 of file HTTPRequest.hpp.
References pion::net::HTTPMessage::deleteValue().
1.5.5