An HTTP request. More...
#include <http_request.h>
Public Member Functions | |
| request () | |
Construct an empty request. (sets the method to GET) | |
| request (HTTPMethod method, std::string raw_url, std::string url, query_string url_params, ci_map headers, std::string body) | |
| Construct a request with all values assigned. | |
| void | add_header (std::string key, std::string value) |
| const std::string & | get_header_value (const std::string &key) const |
| template<typename CompletionHandler > | |
| void | post (CompletionHandler handler) |
| Send the request with a completion handler and return immediately. | |
| template<typename CompletionHandler > | |
| void | dispatch (CompletionHandler handler) |
| Send the request with a completion handler. | |
Public Attributes | |
| HTTPMethod | method |
| std::string | raw_url |
The full URL containing the ? and URL parameters. | |
| std::string | url |
| The endpoint without any parameters. | |
| query_string | url_params |
The parameters associated with the request. (everything after the ?) | |
| ci_map | headers |
| std::string | body |
| std::string | remoteIpAddress |
| The IP address from which the request was sent. | |
| void * | middleware_context {} |
| boost::asio::io_service * | io_service {} |
An HTTP request.