React Native Android Fetch failing on connection to local API

前端 未结 9 1848
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 22:08

I\'m using the fetch API in my react-native Android app to make requests to a local API. I usually query said API from react web apps at http://localhost:8163.

I\'m t

9条回答
  •  粉色の甜心
    2020-11-28 23:15

    If you're using expo just copy the URL above QR code and add it to you API instead localhost

    it will like this

    {
      expo host :http://192.168.0.109:{Your Port}/The name for your API
    }
    

提交回复
热议问题