In the Angular $http
docs, it mentions that you can set the 'timeout' config to either a number or a promise.
timeout – {number|Promise} – timeout in milliseconds, or promise that should abort the request when resolved.
But I am not sure how to make this work using a promise. how do i set a number and a promise ? Basically I want to be able to know whether an http call (promise) errored due to a 'timeout' or something else. I need to be able to tell the difference. Thanks for any help !!!
statusText
value which would to be"unknown"
github.com/angular/angular.js/blob/v1.2.23/src/ng/… eg.if (reject.status === 0 && reject.statusText === 'unknown') { ...
Should be careful thought, it's undocumented. – Intendancy