React Native Android Fetch failing on connection to local API

前端 未结 9 1866
被撕碎了的回忆
被撕碎了的回忆 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 22:50

    http or https based on it copy the URLhttps://ngrok.com/download

    **step 1: download ngrok unzip the package

    step 2 :open ngrok.exe install it (or) double click on it terminal will be open

    step 3: type

        ngrok http (port no of backend services)
    
    eg:ngrok http 8081
    

    step 4: copy url of https if it is https and then paste it in place of URL from UI. **

提交回复
热议问题