<p dir="auto">Why do I get <code class="notranslate">Network error</code> message?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="axios.defaults.headers.post['Content-Type'] = 'application/json';
axios({
  method: 'post',
  url: url,
  data: pages
}).then(response =&gt; {
  this.setState({
    pages: response.data
  })
}).catch(function (error) {
  console.log(error);
});"><pre class="notranslate"><code class="notranslate">axios.defaults.headers.post['Content-Type'] = 'application/json';
axios({
  method: 'post',
  url: url,
  data: pages
}).then(response =&gt; {
  this.setState({
    pages: response.data
  })
}).catch(function (error) {
  console.log(error);
});
</code></pre></div>
<p dir="auto">Calling from a react app the BE with axios and got this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context."><pre class="notranslate"><code class="notranslate">TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context.
</code></pre></div>
<p dir="auto">Do you have any idea what is wrong?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="axios.defaults.headers.post['Content-Type'] = 'application/json';
axios({
  method: 'post',
  url: url,
  data: pages
}).then(function (response) {
  this.setState({
    pages: response.data
  });
}).catch(function (error) {
  console.log(error);
});"><pre class="notranslate"><code class="notranslate">axios.defaults.headers.post['Content-Type'] = 'application/json';
axios({
  method: 'post',
  url: url,
  data: pages
}).then(function (response) {
  this.setState({
    pages: response.data
  });
}).catch(function (error) {
  console.log(error);
});
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11924475/69961266-cf011680-150b-11ea-975f-c129c822cb82.png"><img width="691" alt="Képernyőfotó 2019-12-02 - 13 58 09" src="https://user-images.githubusercontent.com/11924475/69961266-cf011680-150b-11ea-975f-c129c822cb82.png" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11924475/69961267-cf011680-150b-11ea-9633-f46366a63b2a.png"><img width="782" alt="Képernyőfotó 2019-12-02 - 13 57 52" src="https://user-images.githubusercontent.com/11924475/69961267-cf011680-150b-11ea-9633-f46366a63b2a.png" style="max-width: 100%;"></a></p>