Accept-Encoding: gzip
is added automatically and the gzip’d response will be ungzipped transparently. You can confirm by looking for the Transfer-Encoding: gzip
header on the networkResponse()
on the Response
object.
https://github.com/square/okhttp/issues/2132
主动添加 Accept-Encoding 不会自动去解析 gzip 资源
转自:https://www.jianshu.com/p/a9d861732445