cancel
Showing results for 
Search instead for 
Did you mean: 

Content-Encoding configuration in HANA

Former Member
0 Kudos

Hi All,

I have my application on HANA system. I make a request from browser and the response is in simple text or javascript file without any compression.

What configuration do I have to make so that the response from HANA is compressed (Gzip or Deflate).

I am using SPS8 system.

Thanks in Advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ashwin,

Hope your doing good.

If your accepting the browser using xsjs and calling hana procedure/view to obtain result in text file format, you can make use of server side javascript utilities API to gunzip the obtained result and pass it as response to output (UI).

below is the sample XSJS code while utilizes the gzip utilities API.

var zip = new $.util.Zip();

zip["first_entry"] = "some result";

$.response.status = $.net.http.OK;

$.response.contentType = "application/zip";

$.response.setBody(zip.asArrayBuffer());

Please follow the link below for more info on zip utlity.

Using the Server-Side JavaScript APIs - SAP HANA Developer Guide for SAP HANA Studio - SAP Library

Regards,

Anil