An attempt to incorporate gzip into an Android project in order to reduce client data costs. All devices connect to the WCF web service, and IIS now sends the compressed data back to the devices as expected. Now I need to figure out how to send back the gzipped xml data modified on the Android device. The device code is as follows
httpsURLConnection.setDoInput(true);
httpsURLConnection.setDoOutput(true);
httpsURLConnection.setConnectTimeout(TIMEOUT);
httpsURLConnection.setReadTimeout(TIMEOUT);
httpsURLConnection.setRequestMethod("POST");
httpsURLConnection.setRequestProperty("Content-Type", "application/xml");
httpsURLConnection.setRequestProperty("Content-Encoding", "gzip);
httpsURLConnection.connect();
GZIPOutputStream gzipOutputStream = new GZIPOutputStream(new BufferedOutputStream((httpsURLConnection.getOutputStream())));
gzipOutputStream.write(_xmlText.getBytes());
gzipOutputStream.flush();
gzipOutputStream.finish();
gzipOutputStream.close();
Wireshark - gzip .
, - WCF, , - XmlException - . 1, 1.
, , WCF gzip - , , , . .net gzip? .net 4.5?
.