| Home | Libraries | People | FAQ | More

###### http::chunk_header::chunk_header (4 of 5 overloads)

Constructor.

<h7> Synopsis </h7>

    template<
        class ChunkExtensions,
        class Allocator>
    chunk_header(
        std::size_t size,
        ChunkExtensions&& extensions,
        Allocator const& allocator);

<h7> Description </h7>

This constructs a buffer sequence representing a chunked-body size and terminating CRLF (`"\r\n"`) with provided chunk extensions. The specified allocator is used to provide storage for the extensions object.

<h7> Parameters </h7>

Name | Description
--- | ---
`size` | The size of the chunk body that follows. The value be greater than zero.
`extensions` | The chunk extensions object. The expression `extensions.str()` must be valid, and the return type must be convertible to `string_view`. This object will be copied or moved as needed to ensure that the chunk header object retains ownership of the buffers provided by the chunk extensions object.
`allocator` | The allocator to provide storage for the moved or copied extensions object.

<h7> Remarks </h7>

This function participates in overload resolution only if ChunkExtensions meets the requirements stated above.

<h7> See Also </h7>

https://tools.ietf.org/html/rfc7230#section-4.1