Skip to main content

read_http_body

Function read_http_body 

Source
pub fn read_http_body(
    body: HttpBody,
    limits: CodecLimits,
) -> CodecFuture<'static, Result<Bytes, CodecError>>
Expand description

Consumes one HTTP body under an aggregate byte limit.

A stream is consumed incrementally and its transport source is retained on failure. This helper is intentionally the only operation here that buffers an entire body; callers must supply a finite max_body_bytes.