Automatically decode gzip in TRESTResponse?

Cannot assign compressor or intercept TRESTClient.

If I set TRESTRequest.AcceptEncoding to "gzip, deflate", I get a gzip-encoded response from a server that supports gzip.

However, in TIdHTTP, I think it will automatically decrypt it. In TRESTResponse.Content, it is still gzip encoded, and I have to decode it manually using TIdCompressorZlib.DecompressGZipStream (). Is there a way to TRESTResponse automatically decode it?

+2
source share
1 answer

It is native if the TCustomRESTRequest.AcceptEncoding property is set to gzip, deflate "

-1
source

Source: https://habr.com/ru/post/1209718/


All Articles