0

I am trying to get the response from bargain finder as compress. I am setting the "Accept-Encoding": "gzip" but the response is coming as simple json file not compressed.

Response header contains following information also. 'content-encoding': 'gzip', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Server': 'Sabre Gateway'}

1 Answers1

0

There are 2 types of compressed responses:

  1. Accept-Encoding: gzip
    This is done by HTTP, you don't see the compression in the response, because, as far as I know it is the protocol that decompresses it. As you can see in the HTTP header (of the response), there's one that statues content-encoding: gzip which means that it was returned zipped, if not you would likely see json.
    The reason why I say "likely" is that the endpoint seems to be configured to return the BFM response gzipped always, whether you request it (using the Accept-encodding: gzip) or not.

  2. "CompressResponse": { "Value" : true }
    This element is available in the schema, but not covered in the service description because it does not seem to be available for REST, only for SOAP, I have tested it.

Giancarlo
  • 1,446
  • 8
  • 17