3

I'm trying to load gzipped data from our webserver and show it in a cordova Android app. To achieve this, I'm using a RequestBuilder in GWT to create the request and add accept-encoding = deflate and gzip to the POST header. This request gets sent to the server, which answers with a response.

But now I've the problem, that the server sends the gzipped data, but the client doesn't unzip it, so in my response event handler, I get the zipped data. The unzipping works just fine in any webbrowser, but it seems to be a problem in combination with Cordova (or Android webview).

Does anyone know how to enable unzipping gzipped responses with Cordova or Android WebView, or if this is even possible?

Thanks.

1 Answers1

0

From this link : Android: HTTP communication should use "Accept-Encoding: gzip"

You may need to create a plugin that "intercepts" the web request to set the gzip headder, and then "intercepts" the response to unzip it. This seems to be the best answer but is specific to android: https://stackoverflow.com/a/6797742

Community
  • 1
  • 1
Bill Calderwood
  • 111
  • 1
  • 4