React-native IOS, TypeError: Network request failed
<p>I am trying to post a request using FETCH in react-native. However, the request fails sometimes throwing the following message: TypeError: Network request failed. 
The code I use to send a POST request:</p>

<pre><code>fetch(query,{
      method: 'POST',
      headers: {
                'Accept': 'application/json',
                'Content-Type': 'application/x-www-form-urlencoded'
                },
      body: JSON.stringify(data)
      })
      .then(Utils.checkStatus)
      .then(Utils.parseJSON)
      .then(json =&gt; this._handleResponseComments(json))
      .catch(error =&gt; {

         this.setState({isLoading:false, error: 'Error!'});

      });
</code></pre>

<p>What is wrong with my code?</p>

<p>EDIT:</p>

<p>found some clues when logging the xhr object:</p>

<pre><code>{ UNSENT: 0,
  OPENED: 1,
  HEADERS_RECEIVED: 2,
  LOADING: 3,
  DONE: 4,
  onreadystatechange: null,
  onload: [Function],
  upload: {},
  readyState: 4,
  responseHeaders: undefined,
  responseText: 'The network connection was lost.',
  status: 0,
</code></pre>