New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
The possibility of setting Timeouts with HttpClient #34421
Comments
Agreed. If anyone wants to send a PR, that would be awesome 馃槃 |
I can pick this up. Seems like a good issue to start with since I'd like to become a regular contributor. |
Http client allows an optional timeout option to be passed. An error will be emitted when no response is received within the allotted interval. This reflects XMLHttpRequest behaviour that is standard in all modern browsers. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout This is behaviour that has been available for 'regular' js xhr requests, but has not yet been implemented in Angular. Alternatives such as interceptors, RxJS or custom client implementation don't offer the same behaviour in a neat package. I have noticed that a lot of pre-existing code was modified by the formatter, but I hope this doesn't rustle any jimmies. fixes angular#34421
Http client allows an optional timeout option to be passed. An error will be emitted when no response is received within the allotted interval. This reflects XMLHttpRequest behaviour that is standard in all modern browsers. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout This is behaviour that has been available for 'regular' js xhr requests, but has not yet been implemented in Angular. Alternatives such as interceptors, RxJS or custom client implementation don't offer the same behaviour in a neat package. I have noticed that a lot of pre-existing code was modified by the formatter, but I hope this doesn't rustle any jimmies. fixes angular#34421
Http client allows an optional timeout option to be passed. An error will be emitted when no response is received within the allotted interval. This reflects XMLHttpRequest behaviour that is standard in all modern browsers. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout This is behaviour that has been available for 'regular' js xhr requests, but has not yet been implemented in Angular. Alternatives such as interceptors, RxJS or custom client implementation don't offer the same behaviour in a neat package. I have noticed that a lot of pre-existing code was modified by the formatter, but I hope this doesn't rustle any jimmies. fixes angular#34421
Http client allows an optional timeout option to be passed. An error will be emitted when no response is received within the allotted interval. This reflects XMLHttpRequest behaviour that is standard in all modern browsers. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout This is behaviour that has been available for 'regular' js xhr requests, but has not yet been implemented in Angular. Alternatives such as interceptors, RxJS or custom client implementation don't offer the same behaviour in a neat package. fixes angular#34421
Forget about the first PR, I fudged that up with some git shenanigans. Inexperience dealing witht he angular repo and forks I reckon. |
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends. Find more details about Angular's feature request process in our documentation. |
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage. We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package. You can find more details about the feature request process in our documentation. |
Http client allows an optional timeout option to be passed. An error will be emitted when no response is received within the allotted interval. This reflects XMLHttpRequest behaviour that is standard in all modern browsers. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout This is behaviour that has been available for 'regular' js xhr requests, but has not yet been implemented in Angular. Alternatives such as interceptors, RxJS or custom client implementation don't offer the same behaviour in a neat package. fixes angular#34421
+1 |
1 similar comment
+1 |
+1 Is there still a chance for this to be implemented? |
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage. --> crazy !!! it is so obvious that it shall be implemented, ofc no body vote .... |
馃殌 feature request
Relevant Package
This feature request is for @angular/common/httpDescription
Angular's [HttpClient](https://angular.io/guide/http) has no timeout feature. Using alternative solutions like HTTPInterceptors or RxJS for this purpose a connection timeout functionality cannot be achieved. See: https://stackoverflow.com/questions/59348500/is-there-an-http-connection-timeout-in-client-side-js-angularDescribe the solution you'd like
Angular's HttpClient could use and expose [XMLHttpRequest.timeout](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout) that would make this possible.Describe alternatives you've considered
HTTPInterceptors, RxJS timeouts, custom HTTP client implementationThe text was updated successfully, but these errors were encountered: