RESTinio

Public Member Functions | Private Attributes | List of all members
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. More...
| chunked_input_info_t (impl::chunked_input_info_block_t info)
| Initializing constructor. More...
RESTINIO_NODISCARD std::size_t | chunk_count () const noexcept
| Get the count of chunks. More...
RESTINIO_NODISCARD const chunk_info_t & | chunk_at_nochecked (std::size_t index) const noexcept
| Get reference to the description of a chunk by index. More...
RESTINIO_NODISCARD const chunk_info_t & | chunk_at (std::size_t index) const
| Get reference to the description of a chunk by index. More...
RESTINIO_NODISCARD const auto & | chunks () const noexcept
| Get access to the container with description of chunks. More...
RESTINIO_NODISCARD const http_header_fields_t & | trailing_fields () const noexcept
| Get access to the container with trailing fields. More...

## Private Attributes
impl::chunked_input_info_block_t | m_info
| Actual data. More...

## 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 142 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 156 of file chunked_input_info.hpp.

## Member Function Documentation

## ◆ chunk_at()

RESTINIO_NODISCARD const chunk_info_t & restinio::chunked_input_info_t::chunk_at | ( | std::size_t | index | ) | const
| inline

Get reference to the description of a chunk by index.

Exceptions

  std::exception | if index is invalid.

Definition at line 188 of file chunked_input_info.hpp.

## ◆ chunk_at_nochecked()

RESTINIO_NODISCARD const chunk_info_t & restinio::chunked_input_info_t::chunk_at_nochecked | ( | std::size_t | index | ) | const
| inline noexcept

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 177 of file chunked_input_info.hpp.

## ◆ chunk_count()

RESTINIO_NODISCARD std::size_t restinio::chunked_input_info_t::chunk_count | ( |  | ) | const
| inline noexcept

Get the count of chunks.

Return values

  0 | if there is no chunks in the incoming request.

Definition at line 167 of file chunked_input_info.hpp.

## ◆ chunks()

RESTINIO_NODISCARD const auto & restinio::chunked_input_info_t::chunks | ( |  | ) | const
| inline noexcept

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 202 of file chunked_input_info.hpp.

## ◆ trailing_fields()

RESTINIO_NODISCARD const http_header_fields_t & restinio::chunked_input_info_t::trailing_fields | ( |  | ) | const
| inline noexcept

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 215 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 145 of file chunked_input_info.hpp.

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

- restinio/chunked_input_info.hpp