How to decompress (gzip) string on the server side?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2016 02:41 AM
Hi all,
I have URL (https://..../file.csv.gs) and I have to get the file data into the string variable in my server-side script include.
I use this script to get the file data (compressed):
function _myHTTPGet(url) {
restMessage = new sn_ws.RESTMessageV2();
restMessage.setHttpMethod("get");
restMessage.setEndpoint(url);
var response = restMessage.execute();
httpStatus = response.getStatusCode();
return response.getBody();
}
How to decompress the data? Do SNow have support of gzip in server-side scripting?
Regards,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2016 01:50 PM
I don't think it has the ability OOB, but you could always bring in an external library.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 05:14 AM
Hi Dan,
It would be great if you recommend me the library and give code example how to use it.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2019 08:12 AM
Were you able to decompress (gzip) string on the server side?
Vinod Kumar Kachineni
Community Rising Star 2022