RESTinio
|
Information about one chunk in an incoming request with chunked encoding. More...
#include <chunked_input_info.hpp>
Public Member Functions | |
chunk_info_t (std::size_t started_at, std::size_t size, chunk_ext_params_unique_ptr_t ext_params) | |
Initializing constructor. | |
std::size_t | started_at () const noexcept |
Get the starting offset of chunk. | |
std::size_t | size () const noexcept |
Get the size of chunk. | |
string_view_t | make_string_view_nonchecked (string_view_t full_body) const noexcept |
Extract the chunk value from the whole body. | |
string_view_t | make_string_view (string_view_t full_body) const |
Extract the chunk value from the whole body. | |
nullable_pointer_t< const chunk_ext_params_t > | ext_params () const noexcept |
Get a list of chunk extension's params. |
Private Attributes | |
std::size_t | m_started_at |
std::size_t | m_size |
chunk_ext_params_unique_ptr_t | m_ext_params |
Storage of chunk extension parameters. |
Information about one chunk in an incoming request with chunked encoding.
In RESTinio v.0.6.9 all chunks are concatenated into the one body. The information about individual chunks preserved in the form of vector of chunk_info_t objects. Every object contains the offset from the begining of the concatenated body and the size of the chunk. This information allows to extract the corresponding fragment from the whole body.
Definition at line 58 of file chunked_input_info.hpp.
|
inline |
Initializing constructor.
Definition at line 73 of file chunked_input_info.hpp.
|
inlinenodiscardnoexcept |
Get a list of chunk extension's params.
In case this chunk has extensions this function returns a valid pointer to a vector of ext parameters (name-value pairs).
Definition at line 176 of file chunked_input_info.hpp.
|
inlinenodiscard |
Extract the chunk value from the whole body.
A check of possibility of extraction is performed.
exception_t | if full_body is too small to hold the chunk. |
Definition at line 114 of file chunked_input_info.hpp.
|
inlinenodiscardnoexcept |
Extract the chunk value from the whole body.
Definition at line 101 of file chunked_input_info.hpp.
|
inlinenodiscardnoexcept |
Get the size of chunk.
Definition at line 90 of file chunked_input_info.hpp.
|
inlinenodiscardnoexcept |
Get the starting offset of chunk.
Definition at line 85 of file chunked_input_info.hpp.
|
private |
Storage of chunk extension parameters.
The instance will be allocated only if chunk has extension's parameters.
Definition at line 70 of file chunked_input_info.hpp.
|
private |
Definition at line 61 of file chunked_input_info.hpp.
|
private |
Definition at line 60 of file chunked_input_info.hpp.