RESTinio
Static Public Member Functions | Public Attributes | List of all members
restinio::http_field_parsers::content_type_value_t Struct Reference

Tools for working with the value of Content-Type HTTP-field. More...

#include <content-type.hpp>

Static Public Member Functions

static RESTINIO_NODISCARD auto make_parser ()
 A factory function for a parser of Content-Type value. More...
 
static RESTINIO_NODISCARD expected_t< content_type_value_t, restinio::easy_parser::parse_error_ttry_parse (string_view_t what)
 An attempt to parse Content-Encoding HTTP-field. More...
 

Public Attributes

media_type_value_t media_type
 

Detailed Description

Tools for working with the value of Content-Type HTTP-field.

This struct represents parsed value of HTTP-field Content-Type (see https://tools.ietf.org/html/rfc7231#section-3.1.1.5):

     Content-Type = media-type

Where media-type is repesented by media_type_value_t.

Since
v.0.6.1

Definition at line 38 of file content-type.hpp.

Member Function Documentation

◆ make_parser()

static RESTINIO_NODISCARD auto restinio::http_field_parsers::content_type_value_t::make_parser ( )
inlinestatic

A factory function for a parser of Content-Type value.

Since
v.0.6.1

Definition at line 49 of file content-type.hpp.

◆ try_parse()

static RESTINIO_NODISCARD expected_t< content_type_value_t, restinio::easy_parser::parse_error_t > restinio::http_field_parsers::content_type_value_t::try_parse ( string_view_t  what)
inlinestatic

An attempt to parse Content-Encoding HTTP-field.

Since
v.0.6.1

Definition at line 64 of file content-type.hpp.

Member Data Documentation

◆ media_type

media_type_value_t restinio::http_field_parsers::content_type_value_t::media_type

Definition at line 40 of file content-type.hpp.


The documentation for this struct was generated from the following file: