From e3e2e4436e27f69da080a5aaf06e1eb7909880cb Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Mon, 31 Oct 2011 11:34:28 -0700 Subject: fix($http): add .send() alias for .retry() to get better stack trace on error --- src/service/http.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/service/http.js b/src/service/http.js index daf12138..92b95f35 100644 --- a/src/service/http.js +++ b/src/service/http.js @@ -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 */ -- cgit v1.2.3