9#include <userver/utils/fmt_compat.hpp>
11USERVER_NAMESPACE_BEGIN
13namespace server::http {
16enum class HttpMethod {
29const std::string& ToString(HttpMethod method)
noexcept;
32HttpMethod HttpMethodFromString(std::string_view method_str);
39struct fmt::formatter<USERVER_NAMESPACE::server::http::HttpMethod> {
40 constexpr static auto parse(format_parse_context& ctx) {
return ctx.begin(); }
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));