Skip to content
Advertisement

Tag: httpbuilder

How to receive a GZIP response with RESTClient

I am using a service that only works with GZIP compression. I added the accept header and the service works, but RESTClient can not parse the content correctly. My code: The error message is Answer Just add the following after RESTClient instantiation client.setContentEncoding(ContentEncoding.Type.GZIP, ContentEncoding.Type.DEFLATE)

Advertisement