This is happening on Safari iOS 10 Cordova:6.3.1
Request using Angular $http, error function not called
$http.get("http://10.255.255.1").then(function(res){
console.log("res: " + res);
},function(err){
console.log("err: " + err);
});
Promise {$$state: {status: 0}, then: function, catch: function, finally: function}
console: Failed to load resource: The request timed out. (10.255.255.1, line 0)
Request using XMLHttpRequest catches timeout error
var xhr = new XMLHttpRequest(); xhr.onload = function () {
console.log("request finished")
};
xhr.ontimeout = function (e) {
console.log("request timeout")
};
xhr.open('GET', 'http://10.255.255.1', true);
xhr.send(null);
console: request timeout
FYI: http://10.255.255.1 is a url that I am using to test timeout. Source: Artificially create a connection timeout error