Skip to content

The possibility of setting Timeouts with HttpClient #34421

Closed

Description

@swirlsky

🚀 feature request

Relevant Package

This feature request is for @angular/common/http

Description

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-angular

Describe 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 implementation

Activity

  1. added
    area: common/http
    on Dec 16, 2019
  2. added this to the needsTriage milestone on Dec 16, 2019
  3. added
    feature
    on Jan 31, 2020
  4. modified the milestones: needsTriage, Backlog on Jan 31, 2020
  5. alxhub commented on Jan 31, 2020

    @alxhub
    Member

    Agreed. If anyone wants to send a PR, that would be awesome 😄

  6. daftfox commented on Apr 3, 2020

    @daftfox

    I can pick this up. Seems like a good issue to start with since I'd like to become a regular contributor.

  7. daftfox commented on Apr 17, 2020

    @daftfox

    Forget about the first PR, I fudged that up with some git shenanigans. Inexperience dealing witht he angular repo and forks I reckon.

  8. angular-robot commented on Jun 4, 2021

    @angular-robot
    Contributor

    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.

  9. angular-robot commented on Jun 26, 2021

    @angular-robot
    Contributor

    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.

  10. added a commit that references this issue on Jul 7, 2021
    941df0e
  11. added
    feature: in backlog
    and removed on Oct 10, 2021
  12. harikvpy commented on Jan 28, 2023

    @harikvpy

    +1

  13. Rzassar commented on Mar 12, 2023

    @Rzassar

    +1

  14. space11 commented on Apr 20, 2023

    @space11

    +1 Is there still a chance for this to be implemented?

  15. anymos commented on Jun 12, 2023

    @anymos

    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 ....

  16. wartab commented on Jul 10, 2025

    @wartab
    Contributor

    I think this can be closed now 🥳

  17. angular-automatic-lock-bot commented on Aug 12, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  18. locked and limited conversation to collaborators on Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: common/httpfeaturefeature: in backlog

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions