userver
C++ Async Framework
Loading...
Searching...
No Matches
task_inherited_request.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/server/request/task_inherited_request.hpp
4
/// @brief Functions that provide access to HttpRequest stored in
5
/// TaskInheritedVariable.
6
7
#
include
<
string
>
8
#
include
<
string_view
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
http::
headers
{
13
class
PredefinedHeader;
14
}
15
16
namespace
server::
request
{
17
18
/// @brief Get a header from server::http::HttpRequest that is handled by the
19
/// current task hierarchy.
20
/// @return Header value or an empty string, if none such
21
const
std::string&
GetTaskInheritedHeader
(std::string_view header_name);
22
23
/// @overload
24
const
std::string&
GetTaskInheritedHeader
(
25
const
USERVER_NAMESPACE::http::
headers
::PredefinedHeader& header_name);
26
27
/// @brief Checks whether specified header exists in server::http::HttpRequest
28
/// that is handled by the current task hierarchy.
29
/// @return `true` if the header exists, `false` otherwise
30
bool
HasTaskInheritedHeader
(std::string_view header_name);
31
32
/// @overload
33
bool
HasTaskInheritedHeader
(
34
const
USERVER_NAMESPACE::http::
headers
::PredefinedHeader& header_name);
35
36
}
// namespace server::request
37
38
USERVER_NAMESPACE_END
userver
server
request
task_inherited_request.hpp
Generated on Wed May 15 2024 22:22:00 for userver by
Doxygen
1.10.0