title: Unable to successfully use axios with React Native to make a request (IOS)
body: <p>I'm unable to make a successful request with Axios. I have tested with Postman to make sure the server is correct and it works without a problem there. </p>
  
  <p>The error I'm getting is </p>
  
  <pre><code>Network Error
  - node_modules/axios/lib/core/createError.js:15:17 in createError
  - node_modules/axios/lib/adapters/xhr.js:80:22 in handleError
  - node_modules/event-target-shim/dist/event-target-shim.js:818:39 in EventTarget.prototype.dispatchEvent
  - node_modules/react-native/Libraries/Network/XMLHttpRequest.js:574:29 in setReadyState
  - node_modules/react-native/Libraries/Network/XMLHttpRequest.js:388:25 in __didCompleteResponse
  - node_modules/react-native/Libraries/vendor/emitter/EventEmitter.js:190:12 in emit
  - node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:436:47 in __callFunction
  - node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:111:26 in __guard$argument_0
  - node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:10 in __guard
  - node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:110:17 in __guard$argument_0
  * [native code]:null in callFunctionReturnFlushedQueue
  </code></pre>
  
  <p>The way I'm making my call to the backend is</p>
  
  <pre><code>const onSubmit = (e) =&gt; {
      axios.get(`https://127.0.0.1:8080/tasks/`).then((res) =&gt; {}).catch((e) =&gt; console.log(e));
  };
  </code></pre>
  
  <p>Am I doing something wrong in regards to axios? I don't even hit the endpoint since my <code>print("hit")</code>never gets logged through the phone (works with postman though)</p>
  
  <p>Thank you for all the help</p>
  
  <p>When using Fetch</p>
  
  <pre><code>const onSubmit = () =&gt; {
          const requestOptions = {
              method: 'POST',
              headers: { Content_Type: 'application/json' },
              body: JSON.stringify({ id, title, description, date: moment.utc(date).format('YYYY-MM-DD') })
          };
  
          fetch(`http://10.0.0.150:8080/tasks/update_task`, requestOptions)
              .then((res) =&gt; {
                  return res.json();
              })
              .then((data) =&gt; {
                  console.log('the task is: ', task);
                  console.log('succeeded');
              })
              .catch((e) =&gt; console.log(e));
      };
  </code></pre>