title: React Native android fetch network request error
body: <p>Okay I'm at my wits end here with this one.  </p>
  
  <p>So in my React-Native app, I am making a fetch request to an ASP.NET Core API hosted on my network.  </p>
  
  <p>In my API, I have configured the Conveyor VS Code extension and can access the API just fine with any device on my network using the following URL: <code>https://192.168.1.22:45455/api/users/login</code></p>
  
  <p>However, when running the app through Expo, it consistently gives me a Network request failed error when trying to access that url from within React-Native.</p>
  
  <p>this is the actual fetch call: </p>
  
  <pre><code>const makeHeader = (token) =&gt; {
    return {Authorization: 'Bearer ' + token};
  }
  const authenticate = async (token) =&gt; {
    try {
      let res = await fetch(constants.backendUrl + 'users/login', {headers: makeHeader(token)});
      let user = await res.json();
      return user;
    } catch (error) {
      console.error(error);
    }
  }
  </code></pre>
  
  <p>Am I missing something in my fetch options?</p>
  
  <p>Also, when calling the <code>authenticate</code> method, it actually goes through the then statement.  </p>
  
  <pre><code>authenticateUser = () =&gt; {
      AsyncStorage.getItem('token')
        .then(token =&gt; {
          authenticate(token)
            .then(user =&gt; {
              console.log({user}); // This fires and returns undefined
              this.setState({user})
            })
  
        });
    }
  </code></pre>