2
3
6
7
8
9
10
14#include <restinio/helpers/http_field_parsers/media-type.hpp>
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
69
70
71
72
77 const auto media_type = media_type_value_t::make_weight_aware_parser();
80 maybe_empty_comma_separated_list_p< item_container_t >(
82 media_type >> &item_t::media_type,
84 weight_p() >> &item_t::weight,
85 params_with_opt_value_p() >> &item_t::accept_params
88 ) >> &accept_value_t::items
93
94
95
96
A class for holding the parsed value of qvalue from RFC7231.
std::pair< std::string, std::optional< std::string > > parameter_with_optional_value_t
A type that describes a parameter with optional value.
std::optional< qvalue_t > weight
media_type_value_t media_type
accept_ext_container_t accept_params
parameter_with_optional_value_t accept_ext_t
Tools for working with the value of Accept HTTP-field.
static auto make_parser()
A factory function for a parser of Accept value.
static expected_t< accept_value_t, restinio::easy_parser::parse_error_t > try_parse(string_view_t what)
An attempt to parse Accept HTTP-field.