An HTTP request.
More...
|
| request () |
| Construct an empty request. (sets the method to GET ) More...
|
|
| request (HTTPMethod method, std::string raw_url, std::string url, query_string url_params, ci_map headers, std::string body, unsigned char http_major, unsigned char http_minor, bool has_keep_alive, bool has_close_connection, bool is_upgrade) |
| Construct a request with all values assigned. More...
|
|
void | add_header (std::string key, std::string value) |
|
const std::string & | get_header_value (const std::string &key) const |
|
bool | check_version (unsigned char major, unsigned char minor) const |
|
template<typename CompletionHandler > |
void | post (CompletionHandler handler) |
| Send data to whoever made this request with a completion handler and return immediately. More...
|
|
template<typename CompletionHandler > |
void | dispatch (CompletionHandler handler) |
| Send data to whoever made this request with a completion handler. More...
|
|
◆ request() [1/2]
crow::request::request |
( |
| ) |
|
|
inline |
Construct an empty request. (sets the method to GET
)
◆ request() [2/2]
crow::request::request |
( |
HTTPMethod |
method, |
|
|
std::string |
raw_url, |
|
|
std::string |
url, |
|
|
query_string |
url_params, |
|
|
ci_map |
headers, |
|
|
std::string |
body, |
|
|
unsigned char |
http_major, |
|
|
unsigned char |
http_minor, |
|
|
bool |
has_keep_alive, |
|
|
bool |
has_close_connection, |
|
|
bool |
is_upgrade |
|
) |
| |
|
inline |
Construct a request with all values assigned.
◆ add_header()
void crow::request::add_header |
( |
std::string |
key, |
|
|
std::string |
value |
|
) |
| |
|
inline |
◆ get_header_value()
const std::string& crow::request::get_header_value |
( |
const std::string & |
key | ) |
const |
|
inline |
◆ check_version()
bool crow::request::check_version |
( |
unsigned char |
major, |
|
|
unsigned char |
minor |
|
) |
| const |
|
inline |
◆ post()
template<typename CompletionHandler >
void crow::request::post |
( |
CompletionHandler |
handler | ) |
|
|
inline |
Send data to whoever made this request with a completion handler and return immediately.
◆ dispatch()
template<typename CompletionHandler >
void crow::request::dispatch |
( |
CompletionHandler |
handler | ) |
|
|
inline |
Send data to whoever made this request with a completion handler.
◆ method
◆ raw_url
std::string crow::request::raw_url |
The full URL containing the ?
and URL parameters.
◆ url
std::string crow::request::url |
The endpoint without any parameters.
◆ url_params
The parameters associated with the request. (everything after the ?
)
◆ headers
◆ body
std::string crow::request::body |
◆ remote_ip_address
std::string crow::request::remote_ip_address |
The IP address from which the request was sent.
◆ http_ver_major
unsigned char crow::request::http_ver_major |
◆ http_ver_minor
unsigned char crow::request::http_ver_minor |
◆ keep_alive
bool crow::request::keep_alive |
◆ close_connection
bool crow::request::close_connection |
◆ upgrade
bool crow::request::upgrade |
◆ middleware_context
void* crow::request::middleware_context {} |
◆ middleware_container
void* crow::request::middleware_container {} |
◆ io_service
boost::asio::io_service* crow::request::io_service {} |
The documentation for this struct was generated from the following file: