Skip to main content

read_capped

Function read_capped 

Source
async fn read_capped(
    resp: Response,
    cap: usize,
) -> Result<Option<Vec<u8>>, Error>
Expand description

The body of resp, read chunk by chunk so that no more than cap bytes are ever held: None when it is larger (known from its Content-Length, or found out as it streams in).