mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-02 22:37:07 +08:00
fix($http): add .send() alias for .retry() to get better stack trace on error
This commit is contained in:
@@ -96,7 +96,7 @@ function $HttpProvider() {
|
||||
|
||||
// the actual service
|
||||
function $http(config) {
|
||||
return new XhrFuture().retry(config);
|
||||
return new XhrFuture().send(config);
|
||||
}
|
||||
|
||||
$http.pendingRequests = [];
|
||||
@@ -347,6 +347,9 @@ function $HttpProvider() {
|
||||
return this;
|
||||
};
|
||||
|
||||
// just alias so that in stack trace we can see send() instead of retry()
|
||||
this.send = this.retry;
|
||||
|
||||
/**
|
||||
* Abort the request
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user