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  HttpRequestConfig
 
class  RequestBase
 
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...
 

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 & GetTaskInheritedHeader (std::string_view header_name)
 Get a header from server::http::HttpRequest that is handled by the current task hierarchy.
 
const std::string & GetTaskInheritedHeader (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 HasTaskInheritedHeader (std::string_view header_name)
 Checks whether specified header exists in server::http::HttpRequest that is handled by the current task hierarchy.
 
bool HasTaskInheritedHeader (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.
 

Variables

engine::TaskInheritedVariable< TaskInheritedDatakTaskInheritedData
 

Function Documentation

◆ GetTaskInheritedHeader()

const std::string & server::request::GetTaskInheritedHeader ( 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

◆ HasTaskInheritedHeader()

bool server::request::HasTaskInheritedHeader ( 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

Variable Documentation

◆ kTaskInheritedData

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