-
Notifications
You must be signed in to change notification settings - Fork 27.5k
feat($http): add support for timeout promises #2529
Conversation
I like this quite a bit since unlike all the other attempts it doesn't try to introduce an explicit bi-directional communication between deferred and a promise. Can you add the missing higher level test please? I'll then highlight this PR one angular-dev for api review. I'm quite hopeful about this PR this time around :) |
Excellent! I'll get some more tests in there ASAP. Looks like I'll have to add timeouts to the mock version of $httpBackend, but it shouldn't take long. |
Ok, tests added. I did my best to follow the style/spirit of existing code with this (while keeping changes minimal). Let me know if there are any issues there. |
If the timeout argument is a promise, abort the request when it is resolved. Implemented by adding support to $httpBackend service and $httpBackend mock service. Closes angular#1159
Hi @IgorMinar. Any update on this? |
|
I'll ping the dev team on this. |
Waiting for this to go through to build a feature. Any update? |
LGTM. |
🚢 it |
Landed as 9f4f593! Thanks so much for being patient with us. If you don't have an angular t-shirt please fill out this form and we'll send you one: http://goo.gl/075Sj |
If the timeout argument is a promise, abort the request when it is resolved.
Implemented by adding support to $httpBackend service and $httpBackend mock service.
This is yet another approach to the $http cancel issue (see #2452 and #2523). Obviously there is still a lack of consensus on how to handle it (see kriskowal/q#64), so I propose this as an alternative.
Closes #1159