boost::burl::request_head
A dynamic container for an HTTP request header.
Synopsis
Declared in <boost/burl/request_head.hpp>
class request_head
: public request_head_base
Description
This container builds a request header in a single allocation which grows as needed, mirroring fields for the field section while adding the request line. It owns its storage and never runs out of room.
A default‐constructed object holds the default request line ("GET / HTTP/1.1") and no fields; the request line and fields are filled in through the inherited request_head_base interface. Like fields, a default‐constructed object is a non‐owning view over a shared buffer and does not allocate until it is first modified.
message_head_base::buffer returns the complete header bytes ready for the wire.
Types
Name |
Description |
A view to an HTTP field. |
|
A random‐access iterator to HTTP fields. |
|
A forward range of values for all matching fields. |
Type Aliases
Name |
Description |
A random‐access iterator to HTTP fields. |
|
A reverse random‐access iterator to HTTP fields. |
|
The type used to represent iterator distances |
|
A reverse random‐access iterator to HTTP fields. |
|
The type used to represent sizes |
|
The type of each element. |
Member Functions
Name |
Description |
|
Constructor. |
|
Destructor. |
Assignment. |
|
|
|
Return the value of a field, or throw an exception. |
|
Return an iterator to the beginning. |
|
Return a string view representing the header. |
|
Return the size of the storage space, in bytes. |
|
Return true if the payload uses chunked framing. |
|
Erase all fields. |
|
Return true if a field exists. |
|
Return the payload size stated by Content‐Length. |
|
Return the number of matching fields. |
|
Return true if the container has no fields. |
|
Return an iterator to the end. |
|
|
|
Return true if the Expect field is 100‐continue. |
|
Return an iterator to the matching element if it exists. |
|
Return a forward range containing values for all matching fields. |
|
Return an iterator to the last matching element if it exists. |
|
Insert a field. |
|
Return true if the connection should be kept open. |
|
Return the method as a constant. |
|
Return the method as it appears in the start line. |
|
Return the type of payload framing. |
|
Return a reverse iterator to the beginning. |
|
Return a reverse iterator to the end. |
|
Reserve storage. |
|
|
|
Add or remove the chunked transfer coding. |
|
Set the Content‐Length field. |
|
Add or remove the Expect: 100‐continue field. |
|
Set whether the connection should be kept open. |
|
|
|
Set the entire request line. |
|
Set the request‐target. |
|
Set the HTTP version. |
|
Remove excess capacity. |
|
Return the number of fields in the container. |
|
Swap the contents. |
|
Return the request‐target. |
|
Return true if the message proposes a protocol switch. |
|
Return the value of a field or a default if missing. |
|
Return the HTTP version of the message. |
Data Members
Name |
|
|
Static Data Members
Name |
Description |
The alignment an external buffer must end on. |
|
Maximum allowed size of the storage. |
|
Maximum allowed name size |
|
Maximum allowed size of the start line |
|
Maximum allowed value size |
Protected Member Functions
Name |
Description |
Assignment operators |
|
|
|
|
|
|
|
|
|
See Also
request_head_base for the request‐line observers and modifiers.
Created with MrDocs