#include <request.hpp>
Inherits pion::http::message.
Public Member Functions | |
request (const std::string &resource) | |
request (void) | |
constructs a new request object (default constructor) | |
virtual | ~request () |
virtual destructor | |
virtual void | clear (void) |
clears all request data | |
virtual bool | is_content_length_implied (void) const |
the content length of the message can never be implied for requests | |
const std::string & | get_method (void) const |
returns the request method (i.e. GET, POST, PUT) | |
const std::string & | get_resource (void) const |
returns the resource uri-stem to be delivered (possibly the result of a redirect) | |
const std::string & | get_original_resource (void) const |
returns the resource uri-stem originally requested | |
const std::string & | get_query_string (void) const |
returns the uri-query or query string requested | |
const std::string & | get_query (const std::string &key) const |
returns a value for the query key if any are defined; otherwise, an empty string | |
ihash_multimap & | get_queries (void) |
returns the query parameters | |
bool | has_query (const std::string &key) const |
returns true if at least one value for the query key is defined | |
void | set_method (const std::string &str) |
sets the HTTP request method (i.e. GET, POST, PUT) | |
void | set_resource (const std::string &str) |
sets the resource or uri-stem originally requested | |
void | change_resource (const std::string &str) |
changes the resource or uri-stem to be delivered (called as the result of a redirect) | |
void | set_query_string (const std::string &str) |
sets the uri-query or query string requested | |
void | add_query (const std::string &key, const std::string &value) |
adds a value for the query key | |
void | change_query (const std::string &key, const std::string &value) |
changes the value of a query key | |
void | delete_query (const std::string &key) |
removes all values for a query key | |
void | use_query_params_for_query_string (void) |
use the query parameters to build a query string for the request | |
void | use_query_params_for_post_content (void) |
use the query parameters to build POST content for the request | |
void | set_content (const std::string &value) |
add content (for POST) from string | |
void | set_content (const char *value, const boost::uint64_t &size) |
void | set_user (user_ptr user) |
sets the user record for HTTP request after authentication | |
user_ptr | get_user () const |
get the user record for HTTP request after authentication | |
Protected Member Functions | |
virtual void | update_first_line (void) const |
updates the string containing the first line for the HTTP message | |
virtual void | append_cookie_headers (void) |
appends HTTP headers for any cookies defined by the http::message |
request: container for HTTP request information
Definition at line 26 of file request.hpp.
pion::http::request::request | ( | const std::string & | resource | ) | [inline] |
constructs a new request object
resource | the HTTP resource to request |
Definition at line 36 of file request.hpp.
void pion::http::request::set_content | ( | const char * | value, | |
const boost::uint64_t & | size | |||
) | [inline] |
add content (for POST) from buffer of given size does nothing if the buffer is invalid or the buffer size is zero
Definition at line 148 of file request.hpp.
References pion::http::message::create_content_buffer(), and pion::http::message::set_content_length().