在RN 中使用axios,发现android不支持 gzip



  • github上建了一个问题

    https://github.com/facebook/react-native/issues/3572

    0
    down vote
    favorite
    "axios": "^0.16.2"

    "react": "16.0.0-alpha.12"

    "react-native": "^0.47.1"

    Before send the request I set a header axios.defaults.headers.common['Accept-Encoding'] = 'gzip, deflate'. I got some unknown response(actually it is JSON), and it works fine in iOS.

    问了半天google,看起来像rn就不支持gzip。 如果真的不支持,后端API用什么压缩?


登录后回复