Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

React Native for iOS: "network request failed" for one URL but not others

$
0
0

In my React Native app, I'm trying to make an API call with this code:

test = async () => {    try {      let a = await fetch('https://rxapitest.alliancepharmacygroup.ca:12345/', {        method: 'GET',      }).then(response => {        console.log("success")      })    } catch(err) {      console.log("error")    }  }

On Android this works fine. In Postman the request works fine. And when I replace the URL with https://google.com or something, it works fine. So it seems that the problem is with this particular URL for iOS only.

Here's my stacktrace:

enter image description here

Does anyone know how I can approach this?


Viewing all articles
Browse latest Browse all 16552

Trending Articles