RESTinio

Public Member Functions | Private Attributes | List of all members
restinio::http_header_field_t Class Reference

A single header field. More...

`#include <http_headers.hpp>`

## Public Member Functions
| http_header_field_t ()
| http_header_field_t (std::string name, std::string value)
| http_header_field_t (string_view_t name, string_view_t value)
| http_header_field_t (http_field_t field_id, std::string value)
| http_header_field_t (http_field_t field_id, string_view_t value)
const std::string & | name () const noexcept
const std::string & | value () const noexcept
http_field_t | field_id () const noexcept
void | name (std::string n)
void | value (std::string v)
void | append_value (string_view_t v)
void | field_id (http_field_t field_id)

## Private Attributes
std::string | m_name
std::string | m_value
http_field_t | m_field_id

## Detailed Description

A single header field.

Fields m_name and m_field_id are kind of having the same meaning, and m_name field seems like can be omitted, but for the cases of custom header fields it is important to rely on the name only. And as the names of almoust all speified fields fits in SSO it doesn't involve much overhead on standard fields.

Definition at line 582 of file http_headers.hpp.

## Constructor & Destructor Documentation

## ◆ http_header_field_t() [1/5]

restinio::http_header_field_t::http_header_field_t | ( |  | ) |
| inline

Definition at line 585 of file http_headers.hpp.

## ◆ http_header_field_t() [2/5]

restinio::http_header_field_t::http_header_field_t | ( | std::string | name,
|  | std::string | value
| ) |  |
| inline

Definition at line 589 of file http_headers.hpp.

## ◆ http_header_field_t() [3/5]

restinio::http_header_field_t::http_header_field_t | ( | string_view_t | name,
|  | string_view_t | value
| ) |  |
| inline

Definition at line 597 of file http_headers.hpp.

## ◆ http_header_field_t() [4/5]

restinio::http_header_field_t::http_header_field_t | ( | http_field_t | field_id,
|  | std::string | value
| ) |  |
| inline

Definition at line 605 of file http_headers.hpp.

## ◆ http_header_field_t() [5/5]

restinio::http_header_field_t::http_header_field_t | ( | http_field_t | field_id,
|  | string_view_t | value
| ) |  |
| inline

Definition at line 613 of file http_headers.hpp.

## Member Function Documentation

## ◆ append_value()

void restinio::http_header_field_t::append_value | ( | string_view_t | v | ) |
| inline

Definition at line 639 of file http_headers.hpp.

## ◆ field_id() [1/2]

http_field_t restinio::http_header_field_t::field_id | ( |  | ) | const
| inline noexcept

Definition at line 623 of file http_headers.hpp.

## ◆ field_id() [2/2]

void restinio::http_header_field_t::field_id | ( | http_field_t | field_id | ) |
| inline

Definition at line 645 of file http_headers.hpp.

## ◆ name() [1/2]

const std::string & restinio::http_header_field_t::name | ( |  | ) | const
| inline noexcept

Definition at line 621 of file http_headers.hpp.

## ◆ name() [2/2]

void restinio::http_header_field_t::name | ( | std::string | n | ) |
| inline

Definition at line 626 of file http_headers.hpp.

## ◆ value() [1/2]

const std::string & restinio::http_header_field_t::value | ( |  | ) | const
| inline noexcept

Definition at line 622 of file http_headers.hpp.

## ◆ value() [2/2]

void restinio::http_header_field_t::value | ( | std::string | v | ) |
| inline

Definition at line 633 of file http_headers.hpp.

## Member Data Documentation

## ◆ m_field_id

http_field_t restinio::http_header_field_t::m_field_id
| private

Definition at line 654 of file http_headers.hpp.

## ◆ m_name

std::string restinio::http_header_field_t::m_name
| private

Definition at line 652 of file http_headers.hpp.

## ◆ m_value

std::string restinio::http_header_field_t::m_value
| private

Definition at line 653 of file http_headers.hpp.

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

- restinio/http_headers.hpp