Uh oh!
There was an error while loading. Please reload this page.
feat($httpBackend): add timeout support for JSONP requests - #2503
Conversation
petebacondarwin
commented
Apr 25, 2013
Hi @dbinit - Here is the list of things we need to check off before it could be merged. Also I want to check with the core team why this was not included originally. There may be a reason...
|
petebacondarwin
commented
Apr 25, 2013
By the way, you should only have two blank lines in your commit message - one beneath the header and one above the footer. |
dbinit
commented
Apr 25, 2013
Thanks @petebacondarwin, I'm a Google contractor, so don't know if I need to sign the CLA or not... I did just in case (full name: David Bennett). I've updated the commit message. Do I need to submit it to ci.angularjs.org, or do you handle that on merge? |
petebacondarwin
commented
Apr 26, 2013
I can push to CI server but it is having a few timeout issues right now which is why I haven't ticked the box. |
Documentation implies that timeout works for all requests, though it only works with XHR. To implement: - Change $httpBackend to set a timeout for JSONP requests which will immediately resolve the request when fired. - Cancel the timeout when requests are completed.
dbinit
commented
Apr 30, 2013
Any update on this? |
petebacondarwin
commented
Apr 30, 2013
CI server buid is green. Landed at cda7b71. Thanks |
ThomasBurleson
commented
May 7, 2013
Question! |
dbinit
commented
May 8, 2013
@ThomasBurleson, $http checks the status code and rejects the promise if it isn't a success code. See https://github.com/angular/angular.js/blob/master/src/ng/http.js#L939 |
ThomasBurleson
commented
May 9, 2013
I see that now... and with some application code changes it now works! My 2nd-level reject handler was not being called and I thought the issue was the originating resolve...
Without the Thanks again. |
Documentation implies that timeout works for all requests, though it only works with XHR. Change $httpBackend to set a timeout for JSONP requests which will immediately resolve the request when fired. Completed requests will cancel the timeout.