fix($http): add .send() alias for .retry() to get better stack trace on error

This commit is contained in:
Vojta Jina 2011-10-31 11:34:28 -07:00 committed by Igor Minar
parent 972c3e9be0
commit e3e2e4436e

View file

@ -96,7 +96,7 @@ function $HttpProvider() {
// the actual service // the actual service
function $http(config) { function $http(config) {
return new XhrFuture().retry(config); return new XhrFuture().send(config);
} }
$http.pendingRequests = []; $http.pendingRequests = [];
@ -347,6 +347,9 @@ function $HttpProvider() {
return this; return this;
}; };
// just alias so that in stack trace we can see send() instead of retry()
this.send = this.retry;
/** /**
* Abort the request * Abort the request
*/ */