Network error with axios and react native

前端 未结 7 2229
暗喜
暗喜 2021-01-19 13:35

I have created an API endpoint using the Django python framework that I host externally. I can access my endpoint from a browser (mydomain.com/endpoint/) and ve

7条回答
  •  鱼传尺愫
    2021-01-19 14:07

    It seems that unencrypted network requests are blocked by default in iOS, i.e. https will work, http will not.

    From the docs:

    By default, iOS will block any request that's not encrypted using SSL. If you need to fetch from a cleartext URL (one that begins with http) you will first need to add an App Transport Security exception.

提交回复
热议问题