userver: userver/http/http_version.hpp Source File
Loading...
Searching...
No Matches
http_version.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/http/http_version.hpp
4/// @brief @copybrief http::HttpVersion
5
6#include <userver/yaml_config/fwd.hpp>
7
8USERVER_NAMESPACE_BEGIN
9
10namespace http {
11
12/// @brief HTTP version to use
13enum class HttpVersion {
14 kDefault, ///< unspecified version
15 k10, ///< HTTP/1.0 only
16 k11, ///< HTTP/1.1 only
17 k2, ///< HTTP/2 with fallback to HTTP/1.1
18 k2Tls, ///< HTTP/2 over TLS only, otherwise (no TLS or h2) HTTP/1.1
19 k2PriorKnowledge, ///< HTTP/2 only (without Upgrade)
20};
21
22HttpVersion Parse(const yaml_config::YamlConfig& value, formats::parse::To<HttpVersion>);
23
24} // namespace http
25
26USERVER_NAMESPACE_END