MySQL 8.4.2
Source Code Documentation
http::server::ServerRequest Class Reference

a HTTP request and response. More...

#include <request.h>

Inheritance diagram for http::server::ServerRequest:
[legend]

Classes

struct  Holder
 

Public Member Functions

 ServerRequest ()=default
 
 ServerRequest (ConnectionInterface *connection, const uint32_t session_id, const base::method::key_type method, const std::string &path, Headers &&headers)
 
Headersget_output_headers () override
 
IOBufferget_output_buffer () override
 
const std::string & get_input_body () const override
 
const Headersget_input_headers () const override
 
IOBufferget_input_buffer () const override
 
MethodType get_method () const override
 
const Uriget_uri () const override
 
void send_reply (StatusType status_code) override
 
void send_reply (StatusType status_code, const std::string &status_text) override
 
void send_reply (StatusType status_code, const std::string &status_text, const IOBuffer &buffer) override
 
void send_error (StatusType status_code) override
 
void send_error (StatusType status_code, const std::string &status_text) override
 
bool is_modified_since (time_t last_modified) override
 is request modified since 'last_modified'. More...
 
bool add_last_modified (time_t last_modified) override
 add a Last-Modified-Since header to the response headers. More...
 
ConnectionInterfaceget_connection () const override
 
Holderget_data ()
 
- Public Member Functions inherited from http::base::Request
virtual ~Request ()=default
 
virtual StatusType get_response_code () const
 
virtual void set_method (MethodType)
 
virtual void set_uri (Uri &&uri)
 
virtual void set_uri (const Uri &uri)
 

Static Public Member Functions

static void sync_callback (Request *, void *)
 

Private Attributes

Uri uri_
 
ConnectionInterfaceconnection_ {nullptr}
 
Holder holder_
 

Additional Inherited Members

- Public Types inherited from http::base::Request
using IOBuffer = http::base::IOBuffer
 
using Headers = http::base::Headers
 
using Uri = http::base::Uri
 
using MethodType = http::base::method::key_type
 
using StatusType = http::base::status_code::key_type
 
using ConnectionInterface = http::base::ConnectionInterface
 

Detailed Description

a HTTP request and response.

wraps evhttp_request

Constructor & Destructor Documentation

◆ ServerRequest() [1/2]

http::server::ServerRequest::ServerRequest ( )
default

◆ ServerRequest() [2/2]

http::server::ServerRequest::ServerRequest ( ConnectionInterface connection,
const uint32_t  session_id,
const base::method::key_type  method,
const std::string &  path,
Headers &&  headers 
)

Member Function Documentation

◆ add_last_modified()

bool http::server::ServerRequest::add_last_modified ( time_t  last_modified)
overridevirtual

add a Last-Modified-Since header to the response headers.

Reimplemented from http::base::Request.

◆ get_connection()

ConnectionInterface * http::server::ServerRequest::get_connection ( ) const
inlineoverridevirtual

Implements http::base::Request.

◆ get_data()

Holder & http::server::ServerRequest::get_data ( )
inline

◆ get_input_body()

const std::string & http::server::ServerRequest::get_input_body ( ) const
overridevirtual

Implements http::base::Request.

◆ get_input_buffer()

IOBuffer & http::server::ServerRequest::get_input_buffer ( ) const
overridevirtual

Implements http::base::Request.

◆ get_input_headers()

const Headers & http::server::ServerRequest::get_input_headers ( ) const
overridevirtual

Implements http::base::Request.

◆ get_method()

base::method::key_type http::server::ServerRequest::get_method ( ) const
overridevirtual

Reimplemented from http::base::Request.

◆ get_output_buffer()

IOBuffer & http::server::ServerRequest::get_output_buffer ( )
overridevirtual

Implements http::base::Request.

◆ get_output_headers()

Headers & http::server::ServerRequest::get_output_headers ( )
overridevirtual

Implements http::base::Request.

◆ get_uri()

const base::Uri & http::server::ServerRequest::get_uri ( ) const
overridevirtual

Implements http::base::Request.

◆ is_modified_since()

bool http::server::ServerRequest::is_modified_since ( time_t  last_modified)
overridevirtual

is request modified since 'last_modified'.

Returns
true, if local content is newer than the clients last known date, false otherwise

Reimplemented from http::base::Request.

◆ send_error() [1/2]

void http::server::ServerRequest::send_error ( StatusType  status_code)
overridevirtual

Reimplemented from http::base::Request.

◆ send_error() [2/2]

void http::server::ServerRequest::send_error ( StatusType  status_code,
const std::string &  status_text 
)
overridevirtual

Reimplemented from http::base::Request.

◆ send_reply() [1/3]

void http::server::ServerRequest::send_reply ( StatusType  status_code)
overridevirtual

Reimplemented from http::base::Request.

◆ send_reply() [2/3]

void http::server::ServerRequest::send_reply ( StatusType  status_code,
const std::string &  status_text 
)
overridevirtual

Reimplemented from http::base::Request.

◆ send_reply() [3/3]

void http::server::ServerRequest::send_reply ( StatusType  status_code,
const std::string &  status_text,
const IOBuffer buffer 
)
overridevirtual

Reimplemented from http::base::Request.

◆ sync_callback()

static void http::server::ServerRequest::sync_callback ( Request ,
void *   
)
static

Member Data Documentation

◆ connection_

ConnectionInterface* http::server::ServerRequest::connection_ {nullptr}
private

◆ holder_

Holder http::server::ServerRequest::holder_
private

◆ uri_

Uri http::server::ServerRequest::uri_
private

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