kvarn::prelude::internals::read

Function response

source
pub async fn response(
    reader: impl AsyncRead + Unpin,
    max_len: usize,
    timeout: Duration,
) -> Result<Response<Bytes>, Error>
Expand description

Parses a HTTP Response in plain bytes.

ยงErrors

Passes errors from [http::response::Builder::body] and internal checks. See Error for variants. Will also return errors similar to request.