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. More... | |
using | parameter_with_mandatory_value_container_t = std::vector< parameter_with_mandatory_value_t > |
A type of container for parameters with mandatory values. More... | |
using | parameter_with_optional_value_t = std::pair< std::string, restinio::optional_t< std::string > > |
A type that describes a parameter with optional value. More... | |
using | parameter_with_optional_value_container_t = std::vector< parameter_with_optional_value_t > |
A type of container for parameters with optional values. More... | |
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) |
RESTINIO_NODISCARD bool | operator== (const qvalue_t &a, const qvalue_t &b) noexcept |
RESTINIO_NODISCARD bool | operator!= (const qvalue_t &a, const qvalue_t &b) noexcept |
RESTINIO_NODISCARD bool | operator< (const qvalue_t &a, const qvalue_t &b) noexcept |
RESTINIO_NODISCARD bool | operator<= (const qvalue_t &a, const qvalue_t &b) noexcept |
RESTINIO_NODISCARD auto | alpha_symbol_p () |
A factory for producer of ALPHA symbols. More... | |
RESTINIO_NODISCARD auto | alphanum_symbol_p () |
A factory for producer of symbol that an ALPHA or DIGIT. More... | |
RESTINIO_NODISCARD auto | vchar_symbol_p () |
A factory for producer of VCHAR symbols. More... | |
RESTINIO_NODISCARD auto | ctext_symbol_p () |
A factory for producer of ctext symbols. More... | |
RESTINIO_NODISCARD auto | comment_p () |
A factory for producer of comment token. More... | |
RESTINIO_NODISCARD auto | ows_p () noexcept |
A factory function to create an ows_producer. More... | |
RESTINIO_NODISCARD auto | ows () noexcept |
A factory function to create an OWS clause. More... | |
RESTINIO_NODISCARD auto | token_symbol_p () noexcept |
A factory for producer of symbols than can be used in tokens. More... | |
RESTINIO_NODISCARD auto | token_p () noexcept |
A factory function to create a token_producer. More... | |
RESTINIO_NODISCARD auto | quoted_string_p () noexcept |
A factory function to create a quoted_string_producer. More... | |
RESTINIO_NODISCARD auto | quoted_pair_p () noexcept |
A factory function to create a quoted_pair_producer. More... | |
RESTINIO_NODISCARD auto | expected_token_p (string_view_t token) |
A factory function to create a producer that expect a token with specific value. More... | |
RESTINIO_NODISCARD auto | expected_caseless_token_p (string_view_t token) |
A factory function to create a producer that expect a token with specific value. More... | |
RESTINIO_NODISCARD auto | qvalue_p () noexcept |
A factory function to create a qvalue_producer. More... | |
RESTINIO_NODISCARD auto | weight_p () noexcept |
A factory function to create a producer for weight parameter. More... | |
template<typename Container , typename Element_Producer > | |
RESTINIO_NODISCARD auto | non_empty_comma_separated_list_p (Element_Producer element) |
A factory for a producer that handles non-empty list of comma-separated values. More... | |
template<typename Container , typename Element_Producer > | |
RESTINIO_NODISCARD auto | maybe_empty_comma_separated_list_p (Element_Producer element) |
A factory for a producer that handles possibly empty list of comma-separated values. More... | |
RESTINIO_NODISCARD 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. More... | |
RESTINIO_NODISCARD impl::params_with_value_producer_t | params_with_value_p () |
A factory of producer of parameter_with_mandatory_value_container. More... | |
RESTINIO_NODISCARD expected_t< restinio::optional_t< 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. More... | |
RESTINIO_NODISCARD impl::params_with_opt_value_producer_t | params_with_opt_value_p () |
A factory of producer of parameter_with_optional_value_container. More... | |
std::ostream & | operator<< (std::ostream &to, const raw_host_value_t &rhv) |
template<typename Parsed_Field_Type , typename Extra_Data > | |
RESTINIO_NODISCARD 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. More... | |
template<typename Parsed_Field_Type , typename Extra_Data > | |
RESTINIO_NODISCARD 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. More... | |
using restinio::http_field_parsers::parameter_with_mandatory_value_container_t = typedef std::vector< parameter_with_mandatory_value_t > |
A type of container for parameters with mandatory values.
Definition at line 1531 of file basics.hpp.
using restinio::http_field_parsers::parameter_with_mandatory_value_t = typedef std::pair< std::string, std::string > |
A type that describes a parameter with mandatory value.
Definition at line 1521 of file basics.hpp.
using restinio::http_field_parsers::parameter_with_optional_value_container_t = typedef std::vector< parameter_with_optional_value_t > |
A type of container for parameters with optional values.
Definition at line 1706 of file basics.hpp.
using restinio::http_field_parsers::parameter_with_optional_value_t = typedef std::pair< std::string, restinio::optional_t<std::string> > |
A type that describes a parameter with optional value.
Definition at line 1695 of file basics.hpp.
|
inline |
A factory for producer of ALPHA symbols.
Usage example:
Definition at line 788 of file basics.hpp.
|
inline |
A factory for producer of symbol that an ALPHA or DIGIT.
Usage example:
Definition at line 810 of file basics.hpp.
|
inline |
A factory for producer of comment token.
Usage example:
Definition at line 880 of file basics.hpp.
|
inline |
A factory for producer of ctext symbols.
Usage example:
Definition at line 854 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 1112 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 1073 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 1568 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 1738 of file basics.hpp.
RESTINIO_NODISCARD 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 1503 of file basics.hpp.
RESTINIO_NODISCARD 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 1457 of file basics.hpp.
|
inlinenoexcept |
Definition at line 227 of file basics.hpp.
|
inlinenoexcept |
Definition at line 233 of file basics.hpp.
|
inline |
Definition at line 306 of file authorization.hpp.
|
inline |
Definition at line 268 of file authorization.hpp.
|
inline |
Definition at line 260 of file authorization.hpp.
|
inline |
Definition at line 248 of file authorization.hpp.
|
inline |
|
inlinenoexcept |
Definition at line 240 of file basics.hpp.
|
inlinenoexcept |
Definition at line 220 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 939 of file basics.hpp.
|
inlinenoexcept |
A factory function to create an ows_producer.
Usage example:
Definition at line 909 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 1863 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 1685 of file basics.hpp.
|
inlinenoexcept |
A factory function to create a quoted_pair_producer.
Usage example:
Definition at line 1038 of file basics.hpp.
|
inlinenoexcept |
A factory function to create a quoted_string_producer.
Usage example:
Definition at line 1012 of file basics.hpp.
|
inlinenoexcept |
A factory function to create a qvalue_producer.
Usage example:
Definition at line 1250 of file basics.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
A factory for producer of symbols than can be used in tokens.
Usage example:
Definition at line 957 of file basics.hpp.
RESTINIO_NODISCARD 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.
RESTINIO_NODISCARD 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 832 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 1277 of file basics.hpp.