Skip to main content

read_body_capped

Function read_body_capped 

Source
pub async fn read_body_capped(
    resp: Response,
    max_bytes: usize,
) -> Result<Bytes, Response>
Expand description

Read a response body with a size cap. Returns 502 if the upstream response exceeds max_bytes.