/// Reads the `Body` until there is no more to read
Reads the `Body` until there is no more to read
Reads the ` Body ` until there is no more to read
pub(super) async fn read_body_until_end(body: &mut Body) -> Result<BytesMut, MmProxyError> {
    // TOOD: Perhaps there is a more efficient way to do this
    let mut bytes = BytesMut::new();
    while let Some(data) = body.next().await {
        let data = data?;
        bytes.extend(data);
    }
    Ok(bytes)
}
pub ( super ) async fn read_body_until_end ( body : & mut Body ) -> Result < BytesMut , MmProxyError > { // TOOD: Perhaps there is a more efficient way to do this let mut bytes = BytesMut :: new ( ) ; while let Some ( data ) = body . next ( ) . await { let data = data ? ; bytes . extend ( data ) ; } Ok ( bytes ) }
Reads the `Body` until there is no more to read
Reads the ` Body ` until there is no more to read
body
&mut Body