title: React native: Axios Get accusing Network Error
body: <p>I'm coding my first react-native program with Axios and found problems making get calls. Sinse it's a Network error I assume the problem is somewhere below.</p>
  <p>Api.js:</p>
  <pre><code>import axios from &quot;axios&quot;;
  
  const api = axios.create({
    baseURL: &quot;https://192.168.15.8:3333&quot;,
  });
  
  export default api;
  </code></pre>
  <p>index.js</p>
  <pre><code> async function loadIncidents() {
      if (loading) {
          return;
      }
  
      if (total &gt; 0 &amp;&amp; incidents.length === total) {
          return;
      }
  
      setLoading(true);
      try {
          const response = await api.get(&quot;/incidents&quot;, {
              params: { page },
          });
  
          setIncidents([...incidents, ...response.data]);
          setTotal(response.headers[&quot;x-total-count&quot;]);
          setPage(page + 1);
      } catch (err) {
          console.log('Ocorreu um erro: ', err)
      }
      setLoading(false);
  }
  
    useEffect(() =&gt; {
      loadIncidents();
    }, []);
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/dyJpy.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dyJpy.jpg" alt="error:" /></a></p>