RESTinio
Loading...
Searching...
No Matches
restinio::chunked_input_info_t Class Reference

An information about chunks and trailing fields in the incoming request. More...

#include <chunked_input_info.hpp>

Public Member Functions

 chunked_input_info_t ()=default
 Default constructor. Makes empty object.
 chunked_input_info_t (impl::chunked_input_info_block_t info)
 Initializing constructor.
std::size_t chunk_count () const noexcept
 Get the count of chunks.
const chunk_info_tchunk_at_nochecked (std::size_t index) const noexcept
 Get reference to the description of a chunk by index.
const chunk_info_tchunk_at (std::size_t index) const
 Get reference to the description of a chunk by index.
const auto & chunks () const noexcept
 Get access to the container with description of chunks.
const http_header_fields_ttrailing_fields () const noexcept
 Get access to the container with trailing fields.

Private Attributes

impl::chunked_input_info_block_t m_info
 Actual data.

Detailed Description

An information about chunks and trailing fields in the incoming request.

This information is collected if chunked encoding is used in the incoming request.

Since
v.0.6.9

Definition at line 220 of file chunked_input_info.hpp.

Constructor & Destructor Documentation

◆ chunked_input_info_t() [1/2]

restinio::chunked_input_info_t::chunked_input_info_t ( )
default

Default constructor. Makes empty object.

◆ chunked_input_info_t() [2/2]

restinio::chunked_input_info_t::chunked_input_info_t ( impl::chunked_input_info_block_t info)
inline

Initializing constructor.

Note
This constrictor is intended to be used inside RESTinio and can be changed in future versions without any notice.

Definition at line 234 of file chunked_input_info.hpp.

Member Function Documentation

◆ chunk_at()

const chunk_info_t & restinio::chunked_input_info_t::chunk_at ( std::size_t index) const
inlinenodiscard

Get reference to the description of a chunk by index.

Exceptions
std::exceptionif index is invalid.

Definition at line 266 of file chunked_input_info.hpp.

◆ chunk_at_nochecked()

const chunk_info_t & restinio::chunked_input_info_t::chunk_at_nochecked ( std::size_t index) const
inlinenodiscardnoexcept

Get reference to the description of a chunk by index.

Attention
This method doesn't check the validity of index. An attempt to access non-existent chunk is undefined behavior.

Definition at line 255 of file chunked_input_info.hpp.

◆ chunk_count()

std::size_t restinio::chunked_input_info_t::chunk_count ( ) const
inlinenodiscardnoexcept

Get the count of chunks.

Return values
0if there is no chunks in the incoming request.

Definition at line 245 of file chunked_input_info.hpp.

◆ chunks()

const auto & restinio::chunked_input_info_t::chunks ( ) const
inlinenodiscardnoexcept

Get access to the container with description of chunks.

Note
The actual type of the container is not specified and can be changed from version to version. But this container can be sequentially enumerated from begin() to the end().

Definition at line 280 of file chunked_input_info.hpp.

◆ trailing_fields()

const http_header_fields_t & restinio::chunked_input_info_t::trailing_fields ( ) const
inlinenodiscardnoexcept

Get access to the container with trailing fields.

Note
This can be an empty container if there is no trailing fields in the incoming request.

Definition at line 293 of file chunked_input_info.hpp.

Member Data Documentation

◆ m_info

impl::chunked_input_info_block_t restinio::chunked_input_info_t::m_info
private

Actual data.

Definition at line 223 of file chunked_input_info.hpp.


The documentation for this class was generated from the following file: