Network request failed
I have tried allowing port to connect by sudo ufw allow to any port command but it is not helping
fetch('http://192.XXXXXX//form/user_registration.php',
{
method: 'POST',
headers:
{
'Accept': 'application/json',
'Content-Type': 'application/json',
},
Network request failed
Stack trace:
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 <unknown>
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:314:10 in __guard
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:105:17 in callFunctionReturnFlushedQueue
...