RESTinio
|
HTTP Request data. More...
#include <request_handler.hpp>
Public Member Functions | |
template<typename Extra_Data_Factory > | |
generic_request_t (request_id_t request_id, http_request_header_t header, std::string body, impl::connection_handle_t connection, endpoint_t remote_endpoint, Extra_Data_Factory &extra_data_factory) | |
Old-format initializing constructor. | |
template<typename Extra_Data_Factory > | |
generic_request_t (request_id_t request_id, http_request_header_t header, std::string body, chunked_input_info_unique_ptr_t chunked_input_info, impl::connection_handle_t connection, endpoint_t remote_endpoint, Extra_Data_Factory &extra_data_factory) | |
New-format initializing constructor. | |
const http_request_header_t & | header () const noexcept |
Get request header. | |
const std::string & | body () const noexcept |
Get request body. | |
template<typename Output = restinio_controlled_output_t> | |
auto | create_response (http_status_line_t status_line=status_ok()) |
auto | request_id () const noexcept |
Get request id. | |
connection_id_t | connection_id () const noexcept |
Get connection id. | |
const endpoint_t & | remote_endpoint () const noexcept |
Get the remote endpoint of the underlying connection. | |
nullable_pointer_t< const chunked_input_info_t > | chunked_input_info () const noexcept |
Get optional info about chunked input. | |
RESTINIO_NODISCARD Extra_Data & | extra_data () noexcept |
Get writeable access to extra-data object incorporated into a request object. | |
RESTINIO_NODISCARD const Extra_Data & | extra_data () const noexcept |
Get readonly access to extra-data object incorporated into a request object. | |
Private Member Functions | |
void | check_connection () |
Private Attributes | |
const request_id_t | m_request_id |
const http_request_header_t | m_header |
const std::string | m_body |
const chunked_input_info_unique_ptr_t | m_chunked_input_info |
Optional description for chunked-encoding. | |
impl::connection_handle_t | m_connection |
const connection_id_t | m_connection_id |
const endpoint_t | m_remote_endpoint |
Remote endpoint for underlying connection. | |
impl::generic_request_extra_data_holder_t< Extra_Data > | m_extra_data_holder |
An instance of extra-data that is incorporated into a request object. | |
Friends | |
template<typename UD > | |
impl::connection_handle_t & | impl::access_req_connection (generic_request_t< UD > &) noexcept |
HTTP Request data.
Provides acces to header and body, and creates response builder for a given request.
Extra_Data | The type of extra-data to be incorporated into a request object. |
Definition at line 207 of file request_handler.hpp.
|
inline |
Old-format initializing constructor.
Can be used in cases where chunked_input_info_t is not available (or needed).
Definition at line 221 of file request_handler.hpp.
|
inline |
New-format initializing constructor.
Definition at line 244 of file request_handler.hpp.
|
inlinenoexcept |
Get request body.
Definition at line 271 of file request_handler.hpp.
|
inlineprivate |
Definition at line 402 of file request_handler.hpp.
|
inlinenoexcept |
Get optional info about chunked input.
Definition at line 307 of file request_handler.hpp.
|
inlinenoexcept |
Get connection id.
Definition at line 293 of file request_handler.hpp.
|
inline |
Definition at line 278 of file request_handler.hpp.
|
inlinenoexcept |
Get readonly access to extra-data object incorporated into a request object.
Usage example:
Definition at line 395 of file request_handler.hpp.
|
inlinenoexcept |
Get writeable access to extra-data object incorporated into a request object.
Usage example:
Definition at line 349 of file request_handler.hpp.
|
inlinenoexcept |
Get request header.
Definition at line 264 of file request_handler.hpp.
|
inlinenoexcept |
Get the remote endpoint of the underlying connection.
Definition at line 296 of file request_handler.hpp.
|
inlinenoexcept |
Get request id.
Definition at line 290 of file request_handler.hpp.
|
friend |
|
private |
Definition at line 412 of file request_handler.hpp.
|
private |
Optional description for chunked-encoding.
It is present only if chunked-encoded body is found in the incoming request.
Definition at line 421 of file request_handler.hpp.
|
private |
Definition at line 423 of file request_handler.hpp.
|
private |
Definition at line 424 of file request_handler.hpp.
|
private |
An instance of extra-data that is incorporated into a request object.
Definition at line 435 of file request_handler.hpp.
|
private |
Definition at line 411 of file request_handler.hpp.
|
private |
Remote endpoint for underlying connection.
Definition at line 427 of file request_handler.hpp.
|
private |
Definition at line 410 of file request_handler.hpp.