RESTinio
Loading...
Searching...
No Matches
restinio::http_field_parsers::content_disposition_value_t Struct Reference

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

#include <content-disposition.hpp>

Public Types

using parameter_t = parameter_with_mandatory_value_t
using parameter_container_t = parameter_with_mandatory_value_container_t

Static Public Member Functions

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

Public Attributes

std::string value
parameter_container_t parameters

Detailed Description

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

This struct represents parsed value of HTTP-field Content-Disposition (see https://tools.ietf.org/html/rfc6266).

Note
  • the main value of Content-Disposition field is converted to lower case;
  • parameter names are converted to lower case during the parsing;
  • parameter values are left as they are;
  • values of extended parameters are left as they are (it means that if there is "filename*=utf-8''Some%20name" then the value of "filename*" parameter will be "utf-8''Some%20name").
Since
v.0.6.1

Definition at line 336 of file content-disposition.hpp.

Member Typedef Documentation

◆ parameter_container_t

◆ parameter_t

Member Function Documentation

◆ make_parser()

auto restinio::http_field_parsers::content_disposition_value_t::make_parser ( )
inlinestaticnodiscard

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

Since
v.0.6.1

Definition at line 352 of file content-disposition.hpp.

◆ try_parse()

expected_t< content_disposition_value_t, restinio::easy_parser::parse_error_t > restinio::http_field_parsers::content_disposition_value_t::try_parse ( string_view_t what)
inlinestaticnodiscard

An attempt to parse Content-Disposition HTTP-field.

Since
v.0.6.1

Definition at line 395 of file content-disposition.hpp.

Member Data Documentation

◆ parameters

parameter_container_t restinio::http_field_parsers::content_disposition_value_t::parameters

Definition at line 343 of file content-disposition.hpp.

◆ value

std::string restinio::http_field_parsers::content_disposition_value_t::value

Definition at line 342 of file content-disposition.hpp.


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