[Android] fetch with Accept-encoding gzip does not work
Hello,
it seems as if fetch does not work with Accept-encoding in Android, where as it does work in IOS. If you need an example, I'm happy to make one, but the issue is quite self-explanatory I think. :)
Regards Philipp
https://productpains.com/post/react-native/fetch-with-accept-encoding-gzip-does-not-work/
+1
Ok I made some tests, I expected to need some explicit configuration to enable gzipping, which I didn't found documented. But observing the traffic I note Accept-Encoding: gzip was sent without any special configuration.
The response came gzipped and was decoded and parsed correctly. So it's working ok for me.
This on react native v0.18.0
[..]
Hypertext Transfer Protocol
HTTP/1.0 200 OK\r\n
[Expert Info (Chat/Sequence): HTTP/1.0 200 OK\r\n]
Request Version: HTTP/1.0
Status Code: 200
Response Phrase: OK
Date: Fri, 11 Mar 2016 19:33:58 GMT\r\n
Server: Mono.WebServer.XSP/3.8.0.0 Linux\r\n
Content-Encoding: gzip\r\n
X-AspNet-Version: 4.0.30319\r\n
Content-Length: 475\r\n
Expires: -1\r\n
Pragma: no-cache\r\n
Cache-Control: no-cache\r\n
Content-Type: application/json; charset=utf-8\r\n
[...]
Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/android-fetch-with-accept-encoding-gzip-does-not-work
ProductPains helps the community prioritize the most important issues thanks to its voting feature. It is easy to use - just login with GitHub. GitHub issues have voting too, nevertheless Product Pains has been very useful in highlighting the top bugs and feature requests: https://productpains.com/product/react-native?tab=top
Also, if this issue is a bug, please consider sending a pull request with a fix. We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.
is this resolved ?? i still get this issue
Same
Same question https://stackoverflow.com/questions/46433923/axios-could-not-support-gzip-when-use-reactnative-in-android