userver: server::request Namespace Reference
Loading...
Searching...
No Matches
server::request Namespace Reference

Detailed Description

Server request related types and functions.

Classes

class  DeadlinePropagationBlocker
 Stops deadline propagation within its scope. More...
 
class  DeadlineSignal
 Signals when an operation has detected deadline expiration. More...
 
struct  Header
 
struct  HttpRequestConfig
 
class  RequestContext
 Stores request-specific data during request processing. More...
 
class  ResponseBase
 Base class for all the server responses. More...
 
class  ResponseDataAccounter
 
struct  TaskInheritedData
 Per-request data that should be available inside handlers. More...
 

Typedefs

using HeadersToPropagate = boost::container::small_vector<Header, 10>
 

Functions

HttpRequestConfig Parse (const yaml_config::YamlConfig &value, formats::parse::To< HttpRequestConfig >)
 
engine::Deadline GetTaskInheritedDeadline () noexcept
 Returns TaskInheritedData::deadline, or an unreachable engine::Deadline if none was set.
 
void MarkTaskInheritedDeadlineExpired () noexcept
 Marks that the current TaskInheritedData::deadline has expired.
 
const std::string & GetPropagatedHeader (std::string_view header_name)
 Get a header from server::http::HttpRequest that is handled by the current task hierarchy.
 
const std::string & GetPropagatedHeader (const ::http::headers::PredefinedHeader &header_name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool HasPropagatedHeader (std::string_view header_name)
 Checks whether specified header exists in server::http::HttpRequest that is handled by the current task hierarchy.
 
bool HasPropagatedHeader (const ::http::headers::PredefinedHeader &header_name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
boost::iterator_range< HeadersToPropagate::const_iterator > GetPropagatedHeaders ()
 Get a headers that is handled by the current task hierarchy.
 
void SetPropagatedHeaders (HeadersToPropagate headers)
 Set a headers that is handled by the current task hierarchy.
 
const std::string & GetTaskInheritedQueryParameter (std::string_view name)
 Get a query parameter from server::http::HttpRequest that is handled by the current task hierarchy.
 
bool HasTaskInheritedQueryParameter (std::string_view name)
 Checks whether specified query parameter exists in server::http::HttpRequest that is handled by the current task hierarchy.
 

Variables

engine::TaskInheritedVariable< TaskInheritedDatakTaskInheritedData
 

Typedef Documentation

◆ HeadersToPropagate

using server::request::HeadersToPropagate = boost::container::small_vector<Header, 10>

Definition at line 30 of file task_inherited_request.hpp.

Function Documentation

◆ GetPropagatedHeader()

const std::string & server::request::GetPropagatedHeader ( std::string_view header_name)

Get a header from server::http::HttpRequest that is handled by the current task hierarchy.

Returns
Header value or an empty string, if none such

◆ GetTaskInheritedQueryParameter()

const std::string & server::request::GetTaskInheritedQueryParameter ( std::string_view name)

Get a query parameter from server::http::HttpRequest that is handled by the current task hierarchy.

Returns
Parameter value or an empty string, if none such

◆ HasPropagatedHeader()

bool server::request::HasPropagatedHeader ( std::string_view header_name)

Checks whether specified header exists in server::http::HttpRequest that is handled by the current task hierarchy.

Returns
true if the header exists, false otherwise

◆ HasTaskInheritedQueryParameter()

bool server::request::HasTaskInheritedQueryParameter ( std::string_view name)

Checks whether specified query parameter exists in server::http::HttpRequest that is handled by the current task hierarchy.

Returns
true if the parameter exists, false otherwise

Variable Documentation

◆ kTaskInheritedData

engine::TaskInheritedVariable<TaskInheritedData> server::request::kTaskInheritedData
extern
See also
TaskInheritedData for details on the contents.