Skip to main content

read_response_limited

Function read_response_limited 

Source
pub(crate) async fn read_response_limited(
    response: Response,
    maximum: usize,
    too_large: &'static str,
    read_error: &'static str,
) -> Result<Vec<u8>, String>
Expand description

Reads a response body, failing with too_large once it exceeds maximum bytes.