Skip to content

The possibility of setting Timeouts with HttpClient #34421

@swirlsky

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: common/httpIssues related to HTTP and HTTP ClientfeatureIssue that requests a new featurefeature: in backlogFeature request for which voting has completed and is now in the backlog

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions