Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
http::header::reason (2 of 2 overloads)

Set the response reason-phrase (deprecated)

Synopsis
void
reason(
    string_view s);
Description

This function sets a custom reason-phrase to a copy of the string passed in. Normally it is not necessary to set the reason phrase on an outgoing response object; the implementation will automatically use the standard reason text for the corresponding status code. To clear a previously set custom phrase, pass an empty string. This will restore the default standard reason text based on the status code used when serializing. The reason-phrase is obsolete as of rfc7230.

Parameters

Name

Description

s

The string to use for the reason-phrase.

Remarks

This function is only available when isRequest == false.


PrevUpHomeNext