In 1.1.5 and later, you can use the timeout property for a configuration object.
In the documentation:
timeout - {number | Promise} - timeout in milliseconds or a promise should abort the request when resolving it.
A simple example:
$provide.factory('myHttpInterceptor', function($q, someService) { return { 'request': function(config) { var canceler = $q.defer(); config.timeout = canceler.promise; if (true) {
tasseKATT
source share