boost::http_proto::fields_base::set

Set a header value

Synopses

Set a header value

void
set(
    field id,
    core::string_view value);

Set a header value

void
set(
    iterator it,
    core::string_view value);

Set a header value

void
set(
    core::string_view name,
    core::string_view value);

Set a header value

void
set(
    field id,
    core::string_view value,
    system::error_code& ec);

Set a header value

void
set(
    iterator it,
    core::string_view value,
    system::error_code& ec);

Set a header value

void
set(
    core::string_view name,
    core::string_view value,
    system::error_code& ec);

Exceptions

Name

Thrown on

boost::system::system_error

if value is invalid.

std::length_error

if the required space exceeds the maximum capacity.

std::bad_alloc

if the allocation fails.

Parameters

Name

Description

id

The field constant of the header to set.

value

A value, which must be semantically valid for the message.

it

An iterator to the header.

name

The field name.

ec

Set to the error, if value is invalid.

Created with MrDocs