kvarn::extensions

Struct LazyRequestBody

source
pub struct LazyRequestBody { /* private fields */ }
Expand description

A Request Body which is lazily read.

Implementations§

source§

impl LazyRequestBody

source

pub async fn get(&mut self, max_len: usize) -> Result<&Bytes>

Reads the Bytes from the request body. max_len can be used to limit memory allocation. 16MB is often enough for every case.

§Errors

Returns any errors from reading the inner Body.

Trait Implementations§