Code snippet below works fine on iOS and Fuse local preview, but network request fails on an Android device. The actual message is Network request failed
. No response received, just the error gets thrown in the .catch()
.
If I change my requestUrl
to be plain old http
instead of https
then I at least get a 302 redirect, with a response.ok
of false
. But http is not an option here, my request has to be https.
fetch(requestUrl)
.then(function(response) {
console.log(response.status);
console.log(response.ok);
console.log(response);
return response.text();
})
.then(function(responseObject) {
console.log(responseObject);
})
.catch(function(err) {
console.log( 'Error : ' + err.message );
});