Category : fetch

I’m trying to make an api call to my back-end hosted in AWS (nginx + certbot) but every-time, I run the application I am getting the following error error [TypeError: Network request failed] The following is the snippet of the code which I’m using for fetch request. fetch(baseUrl+"/myapi") .then(response => response.json()) .then(result => console.log(result)) .catch(error ..

Read more

My goal is to not use Firebase, instead use a json file locally and fetch data from it just like I would by using Firebases’ DataSnapshot functions: getChildren() and getValue(). I’ve been following a youtube tutorial on how to create a Quiz application on Android, here is the json that I’m using on Firebase: { ..

Read more

I’m using axios in my app. When I make a post request for the very first time after opening the app, it is failing with the following error. From second time onwards, it works without any issue. Network Error – node_modules/axios/lib/core/createError.js:15:17 in createError – node_modules/axios/lib/adapters/xhr.js:81:22 in handleError – node_modules/event-target-shim/dist/event-target-shim.js:818:20 in EventTarget.prototype.dispatchEvent – node_modules/react-native/Libraries/Network/XMLHttpRequest.js:600:10 in setReadyState ..

Read more