RESTinio
|
Tools for working with the value of Accept HTTP-field. More...
#include <accept.hpp>
Classes | |
struct | item_t |
Public Types | |
using | item_container_t = std::vector< item_t > |
Static Public Member Functions | |
static RESTINIO_NODISCARD auto | make_parser () |
A factory function for a parser of Accept value. More... | |
static RESTINIO_NODISCARD expected_t< accept_value_t, restinio::easy_parser::parse_error_t > | try_parse (string_view_t what) |
An attempt to parse Accept HTTP-field. More... | |
Public Attributes | |
item_container_t | items |
Tools for working with the value of Accept HTTP-field.
This struct represents parsed value of HTTP-field Accept (see https://tools.ietf.org/html/rfc7231#section-5.3.2):
Accept = #( media-range [ accept-params ] ) media-range = ( "*" "/" "*" / ( type "/" "*" ) / ( type "/" subtype ) ) *( OWS ";" OWS parameter ) accept-params = weight *( accept-ext ) accept-ext = OWS ";" OWS token [ "=" ( token / quoted-string ) ] weight = OWS ";" OWS "q=" qvalue qvalue = ( "0" [ "." 0*3DIGIT ] ) / ( "1" [ "." 0*3("0") ] )
Definition at line 51 of file accept.hpp.
using restinio::http_field_parsers::accept_value_t::item_container_t = std::vector< item_t > |
Definition at line 64 of file accept.hpp.
|
inlinestatic |
A factory function for a parser of Accept value.
Definition at line 75 of file accept.hpp.
|
inlinestatic |
item_container_t restinio::http_field_parsers::accept_value_t::items |
Definition at line 66 of file accept.hpp.