...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 storing HTTP header fields.
Defined in header <boost/beast/http/fields.hpp>
template< class Allocator> class basic_fields
Name |
Description |
---|---|
The type of allocator used. |
|
The type of element used to represent a field. |
|
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 algorithm used to serialize the header. |
Name |
Description |
---|---|
Returns the value for a field, or throws an exception. |
|
Constructor. Move constructor. Copy 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. Remove all fields with the specified name. |
|
Returns an iterator to the case-insensitive matching field. Returns an iterator to the case-insensitive matching field name. |
|
Return a copy of the allocator associated with the container. |
|
Insert a field. |
|
Returns a copy of the key comparison function. |
|
Move assignment. Copy assignment. |
|
Returns the value for a field, or "" if it does not exist. Returns the value for a case-insensitive matching header, or "" if it does not exist. |
|
Set a field value, removing any other instances of that field. |
|
Return a buffer sequence representing the trailers. |
|
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 true if the Content-Length field is present. |
|
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 |
---|---|
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. This must meet the requirements of Allocator. |
Convenience header <boost/beast/http.hpp>