RESTinio

Classes | Public Types | Static Public Member Functions | Public Attributes | List of all members
restinio::http_field_parsers::raw_host_value_t Struct Reference

Tools for working with the raw value of Host HTTP-field. More...

`#include <host.hpp>`

## Classes
struct | ipv4_address_t
struct | ipv6_address_t
struct | reg_name_t

## Public Types
using | host_value_t = variant_t< reg_name_t, ipv4_address_t, ipv6_address_t >

## Static Public Member Functions
static RESTINIO_NODISCARD auto | make_parser ()
| A factory function for a parser of Host value. More...
static RESTINIO_NODISCARD expected_t< raw_host_value_t, restinio::easy_parser::parse_error_t > | try_parse (string_view_t what)
| An attempt to parse Host HTTP-field. More...

## Public Attributes
host_value_t | host
optional_t< std::uint16_t > | port
| Optional port value. More...

## Detailed Description

Tools for working with the raw value of Host HTTP-field.

This struct represents parsed value of HTTP-field Host with out advanced processing of parsed value (like decoding percent-encoded symbols into UTF-8 byte sequences and transforming string representation of IP addresses into internal form).

See https://tools.ietf.org/html/rfc3986#appendix-A.

Note
  Value of 'host' is converted to lower case.

Since
  v.0.6.9

Definition at line 387 of file host.hpp.

## Member Typedef Documentation

## ◆ host_value_t

using restinio::http_field_parsers::raw_host_value_t::host_value_t = variant_t< reg_name_t, ipv4_address_t, ipv6_address_t >

Definition at line 488 of file host.hpp.

## Member Function Documentation

## ◆ make_parser()

static RESTINIO_NODISCARD auto restinio::http_field_parsers::raw_host_value_t::make_parser | ( |  | ) |
| inline static

A factory function for a parser of Host value.

Since
  v.0.6.9

Definition at line 505 of file host.hpp.

## ◆ try_parse()

static RESTINIO_NODISCARD expected_t< raw_host_value_t, restinio::easy_parser::parse_error_t > restinio::http_field_parsers::raw_host_value_t::try_parse | ( | string_view_t | what | ) |
| inline static

An attempt to parse Host HTTP-field.

Since
  v.0.6.9

Definition at line 550 of file host.hpp.

## Member Data Documentation

## ◆ host

host_value_t restinio::http_field_parsers::raw_host_value_t::host

Definition at line 490 of file host.hpp.

## ◆ port

optional_t<std::uint16_t> restinio::http_field_parsers::raw_host_value_t::port

Optional port value.

Will be empty if there is no 'port' in the value of Host HTTP-field.

Definition at line 496 of file host.hpp.

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

- restinio/helpers/http_field_parsers/host.hpp