RESTinio
|
Helper functions for parsing values of HTTP-fields. More...
#include <restinio/helpers/easy_parser.hpp>
#include <restinio/http_headers.hpp>
#include <restinio/request_handler.hpp>
#include <restinio/variant.hpp>
#include <iostream>
Go to the source code of this file.
Classes | |
struct | restinio::http_field_parsers::field_not_found_t |
A special type to be returned in the case if HTTP-field isn't found in a request. More... | |
struct | restinio::http_field_parsers::try_extract_field_details::valid_field_type< typename, typename > |
struct | restinio::http_field_parsers::try_extract_field_details::valid_field_type< T, restinio::utils::metaprogramming::void_t< std::enable_if_t< std::is_same< expected_t< T, restinio::easy_parser::parse_error_t >, decltype(T::try_parse(std::declval< string_view_t >())) >::value, bool > > > |
Namespaces | |
namespace | restinio |
namespace | restinio::http_field_parsers |
namespace | restinio::http_field_parsers::try_extract_field_details |
Typedefs | |
template<typename Parsed_Field_Type > | |
using | restinio::http_field_parsers::try_extract_field_details::result_variant_t = variant_t< Parsed_Field_Type, field_not_found_t, restinio::easy_parser::parse_error_t > |
Type of a variant to be returned as the result of attempt to parse HTTP-field. More... | |
Functions | |
template<typename Parsed_Field_Type > | |
RESTINIO_NODISCARD result_variant_t< Parsed_Field_Type > | restinio::http_field_parsers::try_extract_field_details::try_extract_field_value_from (optional_t< string_view_t > opt_value, string_view_t default_value) |
template<typename Parsed_Field_Type , typename Extra_Data > | |
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. More... | |
template<typename Parsed_Field_Type , typename Extra_Data > | |
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. More... | |
Helper functions for parsing values of HTTP-fields.
Definition in file try_parse_field.hpp.