boost::http_proto::fields_base::set

Set a header value.

Synopsis

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

Description

Uses the given value to overwrite the current one in the header field pointed to by the iterator. The value must be syntactically valid or else an error is returned.

Any leading or trailing whitespace in the new value is ignored.

Complexity

Exception Safety

Strong guarantee. Calls to allocate may throw. Exception thrown on invalid input. Exception thrown if max capacity exceeded.

Exceptions

Name

Thrown on

system_error

Input is invalid.

std::length_error

Max capacity would be exceeded.

Parameters

Name

Description

it

The iterator to the header.

value

The value which must be semantically valid for the message.

Created with MrDocs