pub async fn encode_response(
res: Response<BoxBody<Bytes, Error>>,
content_encoding: Encoding,
) -> Result<Response<BoxBody<Bytes, Error>>, HyperContentEncodingError>Expand description
Compresses a response with the desired compression algorithm.
Currently, only gzip and deflate are supported
This method will modify the Content-Encoding and Content-Length headers
TODO: encode the stream