13 #include <restinio/exception.hpp> 14 #include <restinio/http_headers.hpp> 16 #include <restinio/impl/include_fmtlib.hpp> 74 std::size_t started_at,
76 chunk_ext_params_unique_ptr_t ext_params )
90 size()
const noexcept {
return m_size; }
103 return full_body.substr( m_started_at, m_size );
116 if( m_started_at >= full_body.size() ||
117 m_started_at + m_size > full_body.size() )
121 RESTINIO_FMT_FORMAT_STRING(
122 "unable to make a chunk (started_at:{}, size: {}) " 123 "from a body with length:{}" ),
130 return make_string_view_nonchecked( full_body );
178 return m_ext_params.get();
257 return m_info.m_chunks[ index ];
268 return m_info.m_chunks.at( index );
282 return m_info.m_chunks;
295 return m_info.m_trailing_fields;
chunk_info_t(std::size_t started_at, std::size_t size, chunk_ext_params_unique_ptr_t ext_params)
Initializing constructor.
string_view_t make_string_view(string_view_t full_body) const
Extract the chunk value from the whole body.
std::size_t size() const noexcept
Get the size of chunk.
Information about one chunk in an incoming request with chunked encoding.
nullable_pointer_t< const chunk_ext_params_t > ext_params() const noexcept
Get a list of chunk extension's params.
chunk_ext_params_unique_ptr_t m_ext_params
Storage of chunk extension parameters.
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, std::optional< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in std::optional<Value_Type> if parameter exis...
std::size_t started_at() const noexcept
Get the starting offset of chunk.
string_view_t make_string_view_nonchecked(string_view_t full_body) const noexcept
Extract the chunk value from the whole body.
Chunk extension parameter.