axios 中的网络错误为 android 做出本机反应

时间:2021-03-04 07:33:21

标签: reactjs react-native axios

嗨,我正在 React Native 中使用 axios 编写 get 调用。

当我直接调用部署在 aws 服务器中的以下 api 时,我收到网络错误。

https://test.co.in/test/fetchAppFlags/mobilenumber

但是当我调用位于本地服务器中并由 ngrok 运行的 api 时,我得到了响应。

https://9929cda57b85.ngrok.io/test/fetchAppFlags/mobilenumber

在将我的 api 调用更改为 aws api 的上述调用之后,我得到了响应。

https://test.co.in/test/fetchAppFlags/mobilenumber

前端调用api或者服务器配置端有没有什么问题。

谢谢。

0 个答案:

没有答案