...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
The type of message returned by the parser.
using value_type = message< isRequest, Body, basic_fields< Allocator >>;
Name |
Description |
---|---|
The type providing the body traits. |
|
The type representing the fields. |
|
The base class used to hold the header portion of the message. |
|
Indicates if the header is a request or response. |
Name |
Description |
---|---|
Returns the header portion of the message. |
|
Returns the body. |
|
Returns true if the chunked Transfer-Encoding is specified. Set or clear the chunked Transfer-Encoding. |
|
Set or clear the Content-Length field. |
|
Returns true if the Content-Length field is present. |
|
Returns true if the message semantics indicate keep-alive. Set the keep-alive message semantic option. |
|
Constructor. Construct a message. |
|
Return the request-method verb. Set the request-method. |
|
Return the request-method as a string. |
|
Returns true if the message semantics require an end of file. |
|
Assignment. |
|
Returns the payload size of the body in octets if possible. |
|
Prepare the message payload fields for the body. |
|
Return the response reason-phrase. Set the response reason-phrase (deprecated) |
|
The response status-code result. Set the response status-code. Set the response status-code as an integer. |
|
The response status-code expressed as an integer. |
|
Returns the request-target string. Set the request-target string. |
|
Return the HTTP-version. Set 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
http::fields
.
A message can be a request or response, depending on the isRequest
template argument value. Requests
and responses have different types; functions may be overloaded based on
the type if desired.
The Body
template argument
type determines the model used to read or write the content body of the
message.
Newly constructed messages objects have version set to HTTP/1.1. Newly
constructed response objects also have result code set to http::ok
.
Type |
Description |
---|---|
|
|
|
A type meeting the requirements of Body. |
|
The type of container used to hold the field value pairs. |