I'm trying to make an Http Post request call to a Http server. I'm using the Apache Http Client library to write the client that connects to the server:
The call reaches the server, but surprisingly I'm facing two issues:
1. the header that I set, Content-Encoding is missing when the request arrives at the server.
Here is what I see as part of the request headers on the server:
Map(Charset -> UTF-8, Connection -> Keep-Alive, Content-Length -> 5530, Content-Type -> application/octet-stream, User-Agent -> Apache-HttpClient/4.1.1 (
java 1.5), Host -> MyComputer:9000)
2. It fails when trying to unzip the contents using Gunzip utility that I have on the server.
Any ideas?