2 years ago
#43152

Max Jacobson
Sending a fetch request while connected to an iOT device without internet
I'm developing an iOS app using Ionic (JavaScript Framework) and I'm connecting to an Iot device and sending a fetch request to it.
If my phone doesn't have a cellular connection, the fetch fails.
This is the process:
Turn on Iot device
Use app to connect to device access point
Send fetch request to device
try { const response = await fetch('http://192.168.1.1/'); // handle response } catch(err) { console.log(err); // handle error }
Fetch fails
Is there a way for the fetch to work when connected to an access point without internet? Are there any other libraries that might help me achieve this?
javascript
ionic-framework
fetch
iot
access-point
0 Answers
Your Answer