| Home | Libraries | People | FAQ | More

##### http::message::header_type

The base class used to hold the header portion of the message.

###### Synopsis

    using header_type = header< isRequest, Fields >;

###### Types

Name | Description
--- | ---
fields_type | The type representing the fields.
is_request | Indicates if the header is a request or response.

###### Member Functions

Name | Description
--- | ---
header | Constructor.
method | Return the request-method verb. Set the request-method.
method_string | Return the request-method as a string.
operator= | Assignment.
reason | Return the response reason-phrase. Set the response reason-phrase (deprecated)
result | The response status-code result. Set the response status-code. Set the response status-code as an integer.
result_int | The response status-code expressed as an integer.
target | Returns the request-target string. Set the request-target string.
version | 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`. Newly constructed header objects have version set to HTTP/1.1. Newly constructed response objects also have result code set to `http::ok`. A `header` includes the start-line and header-fields.

###### Description