...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A container for an HTTP request or response header.
Defined in header <boost/beast/http/message.hpp>
template< bool isRequest, class Fields = fields> class header : public Fields
Name |
Description |
---|---|
The type representing the fields. |
|
Indicates if the header is a request or response. |
Name |
Description |
---|---|
header [constructor] |
Constructor. |
Return the request-method verb. |
|
Return the request-method as a string. |
|
Assignment. |
|
Return the response reason-phrase. |
|
The response status-code result. |
|
The response status-code expressed as an integer. |
|
Returns the request-target string. |
|
Return the HTTP-version. |
This container is derived from the Fields
template type. To understand all of the members of this class it is necessary
to view the declaration for the Fields
type. When using the default fields container, those declarations are in
fields
.
Newly constructed header objects have version set to HTTP/1.1. Newly constructed
response objects also have result code set to status::ok
. A header
includes the start-line and header-fields.