I have some angular factories for making ajax calls towards legacy ASP.NET .asmx web services like so:
module.factory(\'productService\', [\"$http\",
function ($
Developing more on the answer of @stevuu
responseInterceptors
seems to be depreceted (as of 1.2.20) I have modified the code to work on the interceptors
mechanism:
$httpProvider.interceptors.push(function($q, $timeout) {
return {
'response': function(response) {
var defer = $q.defer();
$timeout(function() {
defer.resolve(response);
}, 2300);
return defer.promise;
}
};
});