Skip to main content

decode_request_body

Function decode_request_body 

Source
pub fn decode_request_body(
    raw: &[u8],
    content_type: Option<&str>,
    max_bytes: usize,
) -> Result<DecodedBody, LinoHttpError>
Expand description

Decode a request body according to its Content-Type.

ยงErrors

A 413 when the body is too large, a 415 when its media type is not one this API reads, and a 400 when it is malformed.