Function response_to_string

Source
pub async fn response_to_string(
    res: Response<Incoming>,
) -> Result<String, HyperContentEncodingError>
Expand description

Extracts the body of a response as a String. The response must contain a Content-Type with the word text

Currently the only handled Content-Encodings that are supported are

  • identity
  • x-gzip
  • gzip
  • deflate TODO: stream