2

I am using retrofit in an android app Why if add custom implementation of a NetworkInterceptor the request add the header

 "Accept-Encoding: gzip" 

and I must manually decompress the body response?

If I add the same custom interceptor as Interceptor (not NetworkInterceptor) the "Accept-Encoding" header is not automatically added and (obviusly) I do not need to decompress the body, because the http server respond with plain text

aorlando
  • 668
  • 5
  • 21
  • i just faced the same issue how you fixed this issue? – Sam Nov 16 '17 at 22:48
  • the problem is on the backend side. In my case an nginx web fronted wrongly manipulate the response header – aorlando Nov 24 '17 at 14:34
  • thanks for the reply, I ended up with adding a check for "Accept-Encoding" header and unzip the content, – Sam Nov 26 '17 at 23:00

0 Answers0