title: How do I fix a network error received from axios response reactjs
body: <p>I'm making a post request using axios in reactjs after users login. Here it is:</p>
  
  <pre><code>axios.post('https://localhost:3000/api/login/authentication', {
    email: email,
    password: password
  })
  .then(response =&gt; {
    this.props.history.push('/Main')
  })
  .catch(error =&gt; {
    console.log(error)
  })
  </code></pre>
  
  <p>It goes in the error and I log it to the console. This is what I get:</p>
  
  <p><code>Error: "Network Error"
  createErrorhttp://localhost:3000/static/js/0.chunk.js:26742:15 handleErrorhttp://localhost:3000/static/js/0.chunk.js:26293:14</code></p>
  
  <p>Also in case it's any help, I get this warning before the error:</p>
  
  <p><code>Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:3000/api/login/authentication. (Reason: CORS request did not succeed)</code></p>
  
  <p>Can anyone please help me solve this issue? Thanks in advance!</p>