RESTinio
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
restinio::request_t Class Referencefinal

HTTP Request data. More...

#include <request_handler.hpp>

Inheritance diagram for restinio::request_t:

Public Member Functions

 request_t (request_id_t request_id, http_request_header_t header, std::string body, impl::connection_handle_t connection, endpoint_t remote_endpoint)
 
const http_request_header_theader () const noexcept
 Get request header. More...
 
const std::string & body () const noexcept
 Get request body. More...
 
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. More...
 
connection_id_t connection_id () const noexcept
 Get connection id. More...
 
const endpoint_tremote_endpoint () const noexcept
 Get the remote endpoint of the underlying connection. More...
 

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
 
impl::connection_handle_t m_connection
 
const connection_id_t m_connection_id
 
const endpoint_t m_remote_endpoint
 Remote endpoint for underlying connection. More...
 

Friends

impl::connection_handle_timpl::access_req_connection (request_t &) noexcept
 

Detailed Description

HTTP Request data.

Provides acces to header and body, and creates response builder for a given request.

Definition at line 41 of file request_handler.hpp.

Constructor & Destructor Documentation

◆ request_t()

restinio::request_t::request_t ( request_id_t  request_id,
http_request_header_t  header,
std::string  body,
impl::connection_handle_t  connection,
endpoint_t  remote_endpoint 
)
inline

Definition at line 48 of file request_handler.hpp.

Member Function Documentation

◆ body()

const std::string& restinio::request_t::body ( ) const
inlinenoexcept

Get request body.

Definition at line 71 of file request_handler.hpp.

◆ check_connection()

void restinio::request_t::check_connection ( )
inlineprivate

Definition at line 100 of file request_handler.hpp.

◆ connection_id()

connection_id_t restinio::request_t::connection_id ( ) const
inlinenoexcept

Get connection id.

Definition at line 93 of file request_handler.hpp.

◆ create_response()

template<typename Output = restinio_controlled_output_t>
auto restinio::request_t::create_response ( http_status_line_t  status_line = status_ok())
inline

Definition at line 78 of file request_handler.hpp.

◆ header()

const http_request_header_t& restinio::request_t::header ( ) const
inlinenoexcept

Get request header.

Definition at line 64 of file request_handler.hpp.

◆ remote_endpoint()

const endpoint_t& restinio::request_t::remote_endpoint ( ) const
inlinenoexcept

Get the remote endpoint of the underlying connection.

Definition at line 96 of file request_handler.hpp.

◆ request_id()

auto restinio::request_t::request_id ( ) const
inlinenoexcept

Get request id.

Definition at line 90 of file request_handler.hpp.

Friends And Related Function Documentation

◆ impl::access_req_connection

Member Data Documentation

◆ m_body

const std::string restinio::request_t::m_body
private

Definition at line 110 of file request_handler.hpp.

◆ m_connection

impl::connection_handle_t restinio::request_t::m_connection
private

Definition at line 112 of file request_handler.hpp.

◆ m_connection_id

const connection_id_t restinio::request_t::m_connection_id
private

Definition at line 113 of file request_handler.hpp.

◆ m_header

const http_request_header_t restinio::request_t::m_header
private

Definition at line 109 of file request_handler.hpp.

◆ m_remote_endpoint

const endpoint_t restinio::request_t::m_remote_endpoint
private

Remote endpoint for underlying connection.

Definition at line 116 of file request_handler.hpp.

◆ m_request_id

const request_id_t restinio::request_t::m_request_id
private

Definition at line 108 of file request_handler.hpp.


The documentation for this class was generated from the following file: