...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A typical HTTP header fields container.
Defined in header <boost/beast/http/fields.hpp>
using fields = basic_fields< std::allocator< char > >;
Name |
Description |
---|---|
The type of allocator used. |
|
A constant iterator to the field sequence. |
|
A constant iterator to the field sequence. |
|
A strictly less predicate for comparing keys, using a case-insensitive comparison. |
|
The type of element used to represent a field. |
|
The algorithm used to serialize the header. |
Name |
Description |
---|---|
Returns the value for a field, or throws an exception. |
|
Constructor. |
|
Return a const iterator to the beginning of the field sequence. |
|
Return a const iterator to the beginning of the field sequence. |
|
Return a const iterator to the end of the field sequence. |
|
Remove all fields from the container. |
|
Return the number of fields with the specified name. |
|
Return a const iterator to the end of the field sequence. |
|
Returns a range of iterators to the fields with the specified name.
|
|
Remove a field. |
|
Returns an iterator to the case-insensitive matching field. |
|
Return a copy of the allocator associated with the container. |
|
Insert a field. |
|
Returns a copy of the key comparison function. |
|
Move assignment. |
|
Returns the value for a field, or |
|
Set a field value, removing any other instances of that field.
|
|
Return a buffer sequence representing the trailers. |
|
~basic_fields [destructor] |
Destructor. |
Name |
Description |
---|---|
Returns the chunked Transfer-Encoding setting. |
|
Returns the keep-alive setting. |
|
Returns the request-method string. |
|
Returns the response reason-phrase string. |
|
Returns the request-target string. |
|
Returns |
|
Adjusts the chunked Transfer-Encoding value. |
|
Sets or clears the Content-Length field. |
|
Adjusts the Connection field. |
|
Set or clear the method string. |
|
Set or clear the reason string. |
|
Set or clear the target string. |
Name |
Description |
---|---|
Maximum field name size. |
|
Maximum field value size. |
Name |
Description |
---|---|
Swap two field containers. |
This container is designed to store the field value pairs that make up the fields and trailers in an HTTP message. Objects of this type are iterable, with each element holding the field name and field value.
Field names are stored as-is, but comparisons are case-insensitive. The container
behaves as a std::multiset
; there will be a separate value
for each occurrence of the same field name. When the container is iterated
the fields are presented in the order of insertion, with fields having the
same name following each other consecutively.
Meets the requirements of Fields
Type |
Description |
---|---|
|
The allocator to use. |