actix_web::test

Function try_read_body

source
pub async fn try_read_body<B>(
    res: ServiceResponse<B>,
) -> Result<Bytes, <B as MessageBody>::Error>
where B: MessageBody,
Expand description

Fallible version of read_body that allows testing MessageBody reading errors.