0

I am using Javalite Http client to make a post request to a REST service and would like to get the result gziped (as it can be quite large and compresses well).

I am reading the reply with the post.text() method but the result seems to be the compressed data rather than the actual text data I expected to get.

Is there a way to make Javalite transparently unpack the response when the service reply is compressed or is it by design that I need to check if the reply is compressed and in that case myself find a way to decompress it?

Tristpost
  • 19
  • 4

1 Answers1

0

In the current implementation, JavaLite HTTP does not process responses in any way, and considers such processing (zip, JSON, XML, etc) a responsibility of the developer. You can inspect the headers of the response by using the headers() method and see if it was zipped.

However, JavaLite is constantly improving. I suggest you file an issue as an enhancement here: https://github.com/javalite/activejdbc/issues.

ipolevoy
  • 5,432
  • 2
  • 31
  • 46
  • Thanks for the quick reply. I just wanted confirmation that I was not missing any feature. Have already built the unzipping. – Tristpost May 02 '18 at 03:43