userver
C++ Async Framework
Toggle main menu visibility
Documentation
API Groups
Namespaces
Reference
Class List
Class Index
File List
Macros
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
http_method.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/server/http/http_method.hpp
4
/// @brief @copybrief server::http::HttpMethod
5
6
#
include
<
string
>
7
8
#
include
<
fmt
/
core
.
h
>
9
#
include
<
userver
/
utils
/
fmt_compat
.
hpp
>
10
11
USERVER_NAMESPACE_BEGIN
12
13
namespace
server::
http
{
14
15
/// @brief List of HTTP methods
16
enum
class
HttpMethod
{
17
kDelete,
18
kGet,
19
kHead,
20
kPost,
21
kPut,
22
kPatch,
23
kConnect,
24
kOptions,
25
kUnknown,
26
};
16
enum
class
HttpMethod
{
…
};
27
28
/// @brief Convert HTTP method enum value to string
29
const
std::string&
ToString
(
HttpMethod
method)
noexcept
;
30
31
/// @brief Convert HTTP method string to enum value
32
HttpMethod
HttpMethodFromString
(std::string_view method_str);
33
34
}
// namespace server::http
35
36
USERVER_NAMESPACE_END
37
38
template
<>
39
struct
fmt::formatter<USERVER_NAMESPACE::server::
http
::
HttpMethod
> {
40
constexpr
static
auto
parse(format_parse_context& ctx) {
return
ctx.begin(); }
41
42
template
<
typename
FormatContext>
43
auto
format(USERVER_NAMESPACE::server::
http
::
HttpMethod
method, FormatContext& ctx)
USERVER_FMT_CONST
{
44
return
fmt::format_to(ctx.out(),
"{}"
, USERVER_NAMESPACE
::
server
::
http
::
ToString
(
method
)
);
45
}
46
};
39
struct
fmt::formatter<USERVER_NAMESPACE::server::
http
::
HttpMethod
> {
…
};
userver
server
http
http_method.hpp
Generated on Wed Apr 30 2025 15:48:43 for userver by
Doxygen
1.13.2