2
3
6
7
8
9
10
14#include <restinio/helpers/http_field_parsers/basics.hpp>
32 return produce<std::string>(
33 repeat(1u, 8u, alpha_symbol_p() >> to_container()),
35 symbol_p(
'-') >> to_container(),
36 repeat(1u, 8u, alphanum_symbol_p() >> to_container())
45 return produce<std::string>(
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
89
90
91
92
99 return produce< accept_language_value_t >(
100 non_empty_comma_separated_list_p< item_container_t >(
102 make_language_range_p() >> &item_t::language_range,
103 maybe( weight_p() >> &item_t::weight )
105 ) >> &accept_language_value_t::languages
110
111
112
113
A class for holding the parsed value of qvalue from RFC7231.
auto to_container()
A factory function to create a to_container_consumer.
auto as_result() noexcept
A factory function to create a as_result_consumer.
auto symbol_p(char expected) noexcept
A factory function to create a symbol_producer.
auto make_language_tag_p()
auto make_language_range_p()
std::string language_range
Tools for working with the value of Accept-Language HTTP-field.
static auto make_parser()
A factory function for a parser of Accept-Language value.
static expected_t< accept_language_value_t, restinio::easy_parser::parse_error_t > try_parse(string_view_t what)
An attempt to parse Accept-Language HTTP-field.
item_container_t languages