RESTinio
|
Namespaces | |
namespace | accept_language_details |
namespace | authorization_details |
namespace | basic_auth |
namespace | bearer_auth |
namespace | content_disposition_details |
namespace | details |
namespace | host_details |
namespace | impl |
namespace | qvalue_details |
namespace | range_details |
namespace | try_extract_field_details |
Classes | |
struct | accept_charset_value_t |
Tools for working with the value of Accept-Charset HTTP-field. More... | |
struct | accept_encoding_value_t |
Tools for working with the value of Accept-Encoding HTTP-field. More... | |
struct | accept_language_value_t |
Tools for working with the value of Accept-Language HTTP-field. More... | |
struct | accept_value_t |
Tools for working with the value of Accept HTTP-field. More... | |
struct | authorization_value_t |
Tools for working with the value of Authorization HTTP-field. More... | |
struct | cache_control_value_t |
Tools for working with the value of Cache-Control HTTP-field. More... | |
struct | connection_value_t |
Tools for working with the value of Connection HTTP-field. More... | |
struct | content_disposition_value_t |
Tools for working with the value of Content-Disposition HTTP-field. More... | |
struct | content_encoding_value_t |
Tools for working with the value of Content-Encoding HTTP-field. More... | |
struct | content_type_value_t |
Tools for working with the value of Content-Type HTTP-field. More... | |
struct | field_not_found_t |
A special type to be returned in the case if HTTP-field isn't found in a request. More... | |
struct | media_type_value_t |
Tools for working with media-type in HTTP-fields. More... | |
struct | not_found_t |
An empty type to be used as indicator of negative search result. More... | |
class | qvalue_t |
A class for holding the parsed value of qvalue from RFC7231. More... | |
struct | range_value_t |
Tools for working with the value of Range HTTP-field. More... | |
struct | raw_host_value_t |
Tools for working with the raw value of Host HTTP-field. More... | |
struct | transfer_encoding_value_t |
Tools for working with the value of Transfer-Encoding HTTP-field. More... | |
struct | user_agent_value_t |
Tools for working with the value of User-Agent HTTP-field. More... | |
Typedefs | |
using | parameter_with_mandatory_value_t = std::pair< std::string, std::string > |
A type that describes a parameter with mandatory value. | |
using | parameter_with_mandatory_value_container_t |
A type of container for parameters with mandatory values. | |
using | parameter_with_optional_value_t |
A type that describes a parameter with optional value. | |
using | parameter_with_optional_value_container_t |
A type of container for parameters with optional values. | |
Functions | |
std::ostream & | operator<< (std::ostream &to, const authorization_value_t::param_value_t &v) |
std::ostream & | operator<< (std::ostream &to, const authorization_value_t::param_t &v) |
std::ostream & | operator<< (std::ostream &to, const authorization_value_t::auth_param_t &p) |
std::ostream & | operator<< (std::ostream &to, const authorization_value_t &v) |
bool | operator== (const qvalue_t &a, const qvalue_t &b) noexcept |
bool | operator!= (const qvalue_t &a, const qvalue_t &b) noexcept |
bool | operator< (const qvalue_t &a, const qvalue_t &b) noexcept |
bool | operator<= (const qvalue_t &a, const qvalue_t &b) noexcept |
auto | alpha_symbol_p () |
A factory for producer of ALPHA symbols. | |
auto | alphanum_symbol_p () |
A factory for producer of symbol that an ALPHA or DIGIT. | |
auto | vchar_symbol_p () |
A factory for producer of VCHAR symbols. | |
auto | ctext_symbol_p () |
A factory for producer of ctext symbols. | |
auto | comment_p () |
A factory for producer of comment token. | |
auto | ows_p () noexcept |
A factory function to create an ows_producer. | |
auto | ows () noexcept |
A factory function to create an OWS clause. | |
auto | token_symbol_p () noexcept |
A factory for producer of symbols than can be used in tokens. | |
auto | token_p () noexcept |
A factory function to create a token_producer. | |
auto | quoted_string_p () noexcept |
A factory function to create a quoted_string_producer. | |
auto | quoted_pair_p () noexcept |
A factory function to create a quoted_pair_producer. | |
auto | expected_token_p (string_view_t token) |
A factory function to create a producer that expect a token with specific value. | |
auto | expected_caseless_token_p (string_view_t token) |
A factory function to create a producer that expect a token with specific value. | |
auto | qvalue_p () noexcept |
A factory function to create a qvalue_producer. | |
auto | weight_p () noexcept |
A factory function to create a producer for weight parameter. | |
template<typename Container , typename Element_Producer > | |
auto | non_empty_comma_separated_list_p (Element_Producer element) |
A factory for a producer that handles non-empty list of comma-separated values. | |
template<typename Container , typename Element_Producer > | |
auto | maybe_empty_comma_separated_list_p (Element_Producer element) |
A factory for a producer that handles possibly empty list of comma-separated values. | |
expected_t< string_view_t, not_found_t > | find_first (const parameter_with_mandatory_value_container_t &where, string_view_t what) |
A helper function to find the first occurence of a parameter with the specified value. | |
impl::params_with_value_producer_t | params_with_value_p () |
A factory of producer of parameter_with_mandatory_value_container. | |
expected_t< std::optional< string_view_t >, not_found_t > | find_first (const parameter_with_optional_value_container_t &where, string_view_t what) |
A helper function to find the first occurence of a parameter with the specified value. | |
impl::params_with_opt_value_producer_t | params_with_opt_value_p () |
A factory of producer of parameter_with_optional_value_container. | |
std::ostream & | operator<< (std::ostream &to, const raw_host_value_t &rhv) |
template<typename Parsed_Field_Type , typename Extra_Data > | |
auto | try_parse_field (const generic_request_t< Extra_Data > &req, string_view_t field_name, string_view_t default_value=string_view_t{}) |
A helper function for extraction and parsing a value of HTTP-field. | |
template<typename Parsed_Field_Type , typename Extra_Data > | |
auto | try_parse_field (const generic_request_t< Extra_Data > &req, http_field_t field_id, string_view_t default_value=string_view_t{}) |
A helper function for extraction and parsing a value of HTTP-field. | |
A type of container for parameters with mandatory values.
Definition at line 1533 of file basics.hpp.
using restinio::http_field_parsers::parameter_with_mandatory_value_t = std::pair< std::string, std::string > |
A type that describes a parameter with mandatory value.
Definition at line 1523 of file basics.hpp.
A type of container for parameters with optional values.
Definition at line 1708 of file basics.hpp.
A type that describes a parameter with optional value.
Definition at line 1697 of file basics.hpp.
|
inline |
A factory for producer of ALPHA symbols.
Usage example:
Definition at line 790 of file basics.hpp.
|
inline |
A factory for producer of symbol that an ALPHA or DIGIT.
Usage example:
Definition at line 812 of file basics.hpp.
|
inline |
A factory for producer of comment token.
Usage example:
Definition at line 882 of file basics.hpp.
|
inline |
A factory for producer of ctext symbols.
Usage example:
Definition at line 856 of file basics.hpp.
|
inline |
A factory function to create a producer that expect a token with specific value.
This processer uses case-insensitive comparison.
If the expected token is successfully parsed then boolean value is produced.
Usage example:
Definition at line 1114 of file basics.hpp.
|
inline |
A factory function to create a producer that expect a token with specific value.
If the expected token is successfully parsed then boolean value is produced.
Usage example:
Definition at line 1075 of file basics.hpp.
|
inline |
A helper function to find the first occurence of a parameter with the specified value.
Usage example:
Definition at line 1570 of file basics.hpp.
|
inline |
A helper function to find the first occurence of a parameter with the specified value.
Usage example:
Definition at line 1740 of file basics.hpp.
auto restinio::http_field_parsers::maybe_empty_comma_separated_list_p | ( | Element_Producer | element | ) |
A factory for a producer that handles possibly empty list of comma-separated values.
That producer handles the following rule:
#element => [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
See: https://tools.ietf.org/html/rfc7230 (section "7. ABNF List Extension: #rule")
Usage example:
Container | the type of container to be produced. |
Element_Producer | the type of the producer of a single item. |
Definition at line 1505 of file basics.hpp.
auto restinio::http_field_parsers::non_empty_comma_separated_list_p | ( | Element_Producer | element | ) |
A factory for a producer that handles non-empty list of comma-separated values.
That producer handles the following rule:
1#element => *( "," OWS ) element *( OWS "," [ OWS element ] )
See: https://tools.ietf.org/html/rfc7230 (section "7. ABNF List Extension: #rule")
Usage example:
Container | the type of container to be produced. |
Element_Producer | the type of the producer of a single item. |
Definition at line 1459 of file basics.hpp.
|
inlinenoexcept |
Definition at line 229 of file basics.hpp.
|
inlinenoexcept |
Definition at line 235 of file basics.hpp.
|
inline |
Definition at line 305 of file authorization.hpp.
|
inline |
Definition at line 267 of file authorization.hpp.
|
inline |
Definition at line 259 of file authorization.hpp.
|
inline |
Definition at line 247 of file authorization.hpp.
|
inline |
|
inlinenoexcept |
Definition at line 242 of file basics.hpp.
|
inlinenoexcept |
Definition at line 222 of file basics.hpp.
|
inlinenoexcept |
A factory function to create an OWS clause.
This clause handles an optional sequence of spaces in the input stream and skips the value of that sequence.
Usage example:
This expression corresponds the following rule:
T := OWS 'v' '=' OWS token
Definition at line 941 of file basics.hpp.
|
inlinenoexcept |
A factory function to create an ows_producer.
Usage example:
Definition at line 911 of file basics.hpp.
|
inline |
A factory of producer of parameter_with_optional_value_container.
Creates a produces that handles the following rule:
T := *( OWS ';' OWS token ['=' OWS (token / quoted_string)] )
Usage example:
Definition at line 1865 of file basics.hpp.
|
inline |
A factory of producer of parameter_with_mandatory_value_container.
Creates a produces that handles the following rule:
T := *( OWS ';' OWS token '=' OWS (token / quoted_string))
Usage example:
Definition at line 1687 of file basics.hpp.
|
inlinenoexcept |
A factory function to create a quoted_pair_producer.
Usage example:
Definition at line 1040 of file basics.hpp.
|
inlinenoexcept |
A factory function to create a quoted_string_producer.
Usage example:
Definition at line 1014 of file basics.hpp.
|
inlinenoexcept |
A factory function to create a qvalue_producer.
Usage example:
Definition at line 1252 of file basics.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
A factory for producer of symbols than can be used in tokens.
Usage example:
Definition at line 959 of file basics.hpp.
auto restinio::http_field_parsers::try_parse_field | ( | const generic_request_t< Extra_Data > & | req, |
http_field_t | field_id, | ||
string_view_t | default_value = string_view_t{} ) |
A helper function for extraction and parsing a value of HTTP-field.
This helper is intended to be used when HTTP-field is identified by its ID.
Usage example:
Parsed_Field_Type | The type of field value to be received as the result of successful parse if the field is present. |
Extra_Data | The type of extra-data incorporated into an instance of restinio::generic_request_t. There is no need to specify that type, it has to be detected automatically by the compiler. |
req | A request that should hold a HTTP-field. |
field_id | The ID of a HTTP-field to be extracted and parsed. |
default_value | The default value to be used if HTTP-field is not found. If this value is not empty, then the variant with field_not_found_t won't be returned. |
Definition at line 209 of file try_parse_field.hpp.
auto restinio::http_field_parsers::try_parse_field | ( | const generic_request_t< Extra_Data > & | req, |
string_view_t | field_name, | ||
string_view_t | default_value = string_view_t{} ) |
A helper function for extraction and parsing a value of HTTP-field.
This helper is intended to be used when HTTP-field is identified by its name.
Usage example:
Parsed_Field_Type | The type of field value to be received as the result of successful parse if the field is present. |
Extra_Data | The type of extra-data incorporated into an instance of restinio::generic_request_t. There is no need to specify that type, it has to be detected automatically by the compiler. |
req | A request that should hold a HTTP-field. |
field_name | The name of HTTP-field to be extracted and parsed. |
default_value | The default value to be used if HTTP-field is not found. If this value is not empty, then the variant with field_not_found_t won't be returned. |
Definition at line 151 of file try_parse_field.hpp.
|
inline |
A factory for producer of VCHAR symbols.
Usage example:
Definition at line 834 of file basics.hpp.
|
inlinenoexcept |
A factory function to create a producer for weight parameter.
Returns a producer that handles the following rules:
weight = OWS ';' OWS ('q' / 'Q') '=' qvalue qvalue = ( "0" [ "." 0*3DIGIT ] ) / ( "1" [ "." 0*3("0") ] )
See: https://tools.ietf.org/html/rfc7231
That producer produces a value of type qvalue_t.
Definition at line 1279 of file basics.hpp.