MySQL 8.0.39
Source Code Documentation
|
a HTTP request and response. More...
#include <http_request.h>
Classes | |
class | impl |
Public Types | |
using | RequestHandler = void(*)(HttpRequest *, void *) |
Public Member Functions | |
HttpRequest (RequestHandler cb, void *arg=nullptr) | |
HttpRequest (HttpRequest &&) | |
~HttpRequest () | |
HttpHeaders | get_output_headers () |
HttpHeaders | get_input_headers () const |
HttpBuffer | get_output_buffer () |
HttpBuffer | get_input_buffer () const |
unsigned | get_response_code () const |
std::string | get_response_code_line () const |
HttpMethod::type | get_method () const |
HttpUri | get_uri () const |
void | send_reply (int status_code) |
void | send_reply (int status_code, std::string status_text) |
void | send_reply (int status_code, std::string status_text, HttpBuffer &buffer) |
void | send_error (int status_code) |
void | send_error (int status_code, std::string status_text) |
operator bool () const | |
int | error_code () |
void | error_code (int) |
std::string | error_msg () |
std::error_code | socket_error_code () const |
void | socket_error_code (std::error_code ec) |
bool | is_modified_since (time_t last_modified) |
is request modified since 'last_modified'. More... | |
bool | add_last_modified (time_t last_modified) |
add a Last-Modified-Since header to the response headers. More... | |
Static Public Member Functions | |
static void | sync_callback (HttpRequest *, void *) |
Private Member Functions | |
HttpRequest (std::unique_ptr< impl > &&impl) | |
Private Attributes | |
std::unique_ptr< impl > | pImpl_ |
Friends | |
class | HttpClientConnectionBase |
class | HttpUri |
class | EventHttp |
a HTTP request and response.
wraps evhttp_request
using HttpRequest::RequestHandler = void (*)(HttpRequest *, void *) |
HttpRequest::HttpRequest | ( | HttpRequest::RequestHandler | cb, |
void * | arg = nullptr |
||
) |
HttpRequest::HttpRequest | ( | HttpRequest && | rhs | ) |
|
default |
|
private |
bool HttpRequest::add_last_modified | ( | time_t | last_modified | ) |
add a Last-Modified-Since header to the response headers.
int HttpRequest::error_code | ( | ) |
void HttpRequest::error_code | ( | int | err_code | ) |
std::string HttpRequest::error_msg | ( | ) |
HttpBuffer HttpRequest::get_input_buffer | ( | ) | const |
HttpHeaders HttpRequest::get_input_headers | ( | ) | const |
HttpMethod::type HttpRequest::get_method | ( | ) | const |
HttpBuffer HttpRequest::get_output_buffer | ( | ) |
HttpHeaders HttpRequest::get_output_headers | ( | ) |
unsigned HttpRequest::get_response_code | ( | ) | const |
std::string HttpRequest::get_response_code_line | ( | ) | const |
HttpUri HttpRequest::get_uri | ( | ) | const |
bool HttpRequest::is_modified_since | ( | time_t | last_modified | ) |
is request modified since 'last_modified'.
HttpRequest::operator bool | ( | ) | const |
|
inline |
void HttpRequest::send_error | ( | int | status_code, |
std::string | status_text | ||
) |
|
inline |
void HttpRequest::send_reply | ( | int | status_code, |
std::string | status_text | ||
) |
void HttpRequest::send_reply | ( | int | status_code, |
std::string | status_text, | ||
HttpBuffer & | buffer | ||
) |
std::error_code HttpRequest::socket_error_code | ( | ) | const |
void HttpRequest::socket_error_code | ( | std::error_code | ec | ) |
|
static |
|
friend |
|
friend |
|
friend |
|
private |