I try to use volley for http request. I tried a request on postman and the response headers are below :
- Content-Encoding →gzip
- Content-Length →153
- Content-Type →application/json; charset=utf-8
- Date →Fri, 30 Jun 2017 13:36:10 GMT
- ETag →W/"23-E742p6pP4kakmVh3lok1ww"
- Server →Microsoft-IIS/8.0
- Vary→X-HTTP-Method-Override, Accept-Encoding,Accept-Encoding
- X-Powered-By →Express, ASP.NET
Volley adds some extra keys and removes Content-Length
and Content-Encoding
key. I write keys and values on parseNetworkResponse
function. Response headers are below :
Content-Type : application/json; charset=utf-8 Date : Fri, 30 Jun 2017 09:05:23 GMT ETag : W/"23-E742p6pP4kakmVh3lok1ww" Server : Microsoft-IIS/8.0 Set-Cookie : ARRAffinity=16d81073e15abb17d2faba962adb6504734210ff2b9ff1ddfa770750ac7752e2;Path=/;xxx.net Vary : X-HTTP-Method-Override, Accept-Encoding,Accept-Encoding X-Android-Received-Millis : 1498813523832 X-Android-Response-Source : NETWORK 200 X-Android-Selected-Protocol : http/1.1 X-Android-Sent-Millis : 1498813523632 X-Powered-By : Express
Why does it change content? How can I get Content-Length
and Content-Encoding
?