title: network request failed in react native expo client
body: <p>Network request failed</p>
  
  <p>I have tried allowing port to connect
  by sudo ufw allow to any port command but it is not helping </p>
  
  <pre><code>fetch('http://192.XXXXXX//form/user_registration.php',
          {
              method: 'POST',
              headers:
              {
                  'Accept': 'application/json',
                  'Content-Type': 'application/json',
              },
  </code></pre>
  
  <p>Network request failed</p>
  
  <p>Stack trace:</p>
  
  <pre><code>node_modules/react-native/Libraries/vendor/core/whatwg-fetch.js:504:29 in onerror
    node_modules/event-target-shim/lib/event-target.js:172:43 in dispatchEvent
    node_modules/react-native/Libraries/Network/XMLHttpRequest.js:580:29 in setReadyState
    node_modules/react-native/Libraries/Network/XMLHttpRequest.js:394:25 in __didCompleteResponse
    node_modules/react-native/Libraries/vendor/emitter/EventEmitter.js:190:12 in emit
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:366:47 in __callFunction
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:106:26 in &lt;unknown&gt;
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:314:10 in __guard
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:105:17 in callFunctionReturnFlushedQueue
    ...
  </code></pre>