51 using HeadersList = std::vector<std::pair<Header, std::string>>;
65struct std::formatter<
dcn::http::Header> : std::formatter<std::string> {
98 return formatter<string>::format(
"", ctx);
103struct std::formatter<
dcn::http::HeadersList> : std::formatter<std::string> {
105 std::string headers_str =
"";
106 for(
const auto& [header, header_value] : headers_list)
108 headers_str += std::format(
"{}: {}\n", header, header_value);
110 return formatter<string>::format(headers_str, ctx);
@ Unknown
Definition http_codes.hpp:41
Header
Enum of HTTP headers as defined by the standard This enum contains the most commonly used HTTP header...
Definition http_headers.hpp:20
@ ContentLength
Definition http_headers.hpp:35
@ AccessControlMaxAge
Definition http_headers.hpp:29
@ AccessControlAllowMethods
Definition http_headers.hpp:27
@ Origin
Definition http_headers.hpp:43
@ Date
Definition http_headers.hpp:40
@ Expect
Definition http_headers.hpp:41
@ Unknown
Definition http_headers.hpp:22
@ CacheControl
Definition http_headers.hpp:38
@ ContentEncoding
Definition http_headers.hpp:34
@ Authorization
Definition http_headers.hpp:31
@ ContentType
Definition http_headers.hpp:36
@ AccessControlAllowOrigin
Definition http_headers.hpp:26
@ Connection
Definition http_headers.hpp:33
@ Accept
Definition http_headers.hpp:24
@ AccessControlAllowHeaders
Definition http_headers.hpp:28
std::vector< std::pair< Header, std::string > > HeadersList
A list of headers A HeadersList is a vector of pairs, where the first element of the pair is a Header...
Definition http_headers.hpp:51
http::Header parseHeaderFromString(const std::string &header_str)
Parse a header string to a Header enum.
Definition http_headers.cpp:5
Definition decentralised_art.hpp:35