App hangs on http request using axios, but works on "Debug JS remotly"
See original GitHub issueHi!
I’m having problems to perform any http request using axios to a local server:
axios.post(url, data)
and for url I tried:
url = "http://localhost:3000/authenticate"
url = "http://127.0.0.1:3000/authenticate"
url = "http://192.168.1.10:3000/authenticate"
//server ip address
url = "http://10.0.2.2:3000/authenticate"
//emulator address
and NONE of them worked…
The funny thing (and I can’t understand why) is that as soon as “Debug JS Remotely” the following url worked perfectly:
url = "http://10.0.2.2:3000/authenticate"
//emulator address
So, how should it be my set up to make this work without debugging js remotely??
Trying this on a android device.
“dependencies”: { “axios”: “^0.18.0”, “babel-eslint”: “^8.0.2”, “country-data”: “0.0.31”, “hoist-non-react-statics”: “^3.0.1”, “libphonenumber-js”: “^1.4.3”, “native-base”: “^2.7.2”, “prop-types”: “^15.6.0”, “react”: “16.3.1”, “react-native”: “~0.52.2”, “react-native-animatable”: “^1.2.4”, “react-native-cli”: “^2.0.1”, “react-native-contacts”: “^2.2.2”, “react-native-easy-toast”: “^1.1.0”, “react-native-elements”: “^0.19.1”, “react-native-google-places-autocomplete”: “^1.3.9”, “react-native-keyboard-aware-scroll-view”: “^0.4.1”, “react-native-linear-gradient”: “^2.3.0”, “react-native-maps”: “^0.21.0”, “react-native-navigation”: “^1.1.479”, “react-native-scrollable-tab-view”: “^0.8.0”, “react-native-splash-screen”: “^3.1.1”, “react-native-tab-view”: “^1.0.2”, “react-native-toaster”: “^1.2.2”, “react-native-vector-icons”: “^5.0.0”, “react-redux”: “^5.0.7”, “redux”: “^4.0.0”, “redux-thunk”: “^2.2.0”, “tinycolor2”: “^1.4.1” }
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6
Top GitHub Comments
Downgrade your axios version to 0.18.0.
stupid bot -_-