- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 02:28 PM
Hello all.
I am currently working on a third party integration using REST. The third party want to compress the messages to our ServiceNow instance using gzip. Is there a particular methodology I’ll need to use to decompress the message our end, or is this handled automatically?
Thank you.
Jamie
Solved! Go to Solution.
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2018 01:08 PM
You can test it at your end by sending request to your endpoint by postman or rest api explorer with header
Content-Encoding as gzip
Hope this helps.
Regards
Ujjawal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2018 01:08 PM
You can test it at your end by sending request to your endpoint by postman or rest api explorer with header
Content-Encoding as gzip
Hope this helps.
Regards
Ujjawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2018 01:54 PM
Ah yes, that does help. I had been testing using hurl.it and I had noticed that by default the messages being generated did have Content-Encoding: gzip. So I think this means it will work fine. Than you again!
Jamie.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2018 09:01 AM
Hi Jamie,
Apologies for misunderstanding the scenario. In any case, I wanted to point out that HTTP compression is taken care of at the HTTP layer - so whether you use SOAP or REST doesn't really matter. Inbound HTTP requests are ultimately processed via the Apache Tomcat server HTTP stack which routes the incoming HttpServletRequest (GlideServletRequest) through a servlet Filter chain, including a GZip filter. This filter automatically handles outbound compression and inbound decompression of gzip-encoded content.
Also, for your scenario, the incoming request body would be gzip'd. While this can be tested using Postman (w/binary file option and selecting a pre-gzipped file), I am not aware of how this could be tested using REST Explorer, as I see no option for gzipping the request body. In my own testing when setting Content-Encoding: gzip on a PATCH call, I get a 400 error with message "Not in GZIP format".
I was able to successfully use Postman to send a PATCH with a pre-gzipped request body with the Content-Encoding: gzip header to my Kingston dev instance.
HTH,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2018 12:19 PM
Hello John,
Thank you for taking the time to write up this explanation. It's really helpful to get an understanding of the detail - it was previously a bit too mysterious for me! 🙂