pub fn decode(
headers: &mut HeaderMap,
body: Pin<Box<ByteStream>>,
accept: &AcceptEncoding,
) -> Pin<Box<ByteStream>>Expand description
Decode one layer of a response body, and update its headers to match.
Takes the outermost coding off headers and wraps body in the decoder for it, so the two
cannot disagree about how far the body has been decoded. A body encoded more than once takes
one call per layer.
Leaves both alone when there is nothing to decode: no coding declared, an outermost coding this crate cannot decode or the request did not accept, or a header that could not be read.