title: AXIOS call giving Network Error in React-Native 0.63
body: <p>I'm trying to call API using common HTTPSERVICE method, Strangely I'm getting response whenever the debugger is connected, but API is throwing Network Error when debugger is not connected.</p>
  <p>React-Native Version: 0.63.2
  axios verison: 0.18.0
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const sendRequest = async (url, method, params, data={}, headers = {}) =&gt; {
    try {
      const options = {
        url,
        method,
        params,
        data,
        headers,
      }
      console.log(options);
      return await axios(options);
    } catch (err) {
      console.log("request error",err);
      throw err;
    }
  }
  
  function* HttpService(url, methodType, params, data, headerParams = {}) {
    try {
      const user = yield select(state =&gt; state.ssoReducer.user);
      if (isTokenExpired(user.token)) {
        yield call(getPingFedToken);
      }
      const signIn = yield select(state =&gt; state.ssoReducer);
      const authToken = signIn.user?.token;
      const headers = {
        Authorization: `${authToken}`,
        'SWAP-MOBILE-APP': true,
        "Content-Type": "application/x-www-form-urlencoded",
        ...headerParams
      };
      return yield call(sendRequest, url, methodType, params,  data , headers)
    } catch (error) {
      console.log("http error",error);
      if (error.response.status === (403)) {
        yield put({
          type: SSO_FAILURE,
          payload: "Unauthorised alert"
        });
      }
      throw error;
    }
  }
  
  export default HttpService;</code></pre>
  </div>
  </div>
  </p>
  <p><a href="https://i.stack.imgur.com/7Z5yA.png" rel="nofollow noreferrer">enter image description here</a></p>