Skip to content
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

HttpClient/HttpRequest should support fetch API-specific redirect control #36246

Open
thw0rted opened this issue Mar 25, 2020 · 1 comment
Open

HttpClient/HttpRequest should support fetch API-specific redirect control #36246

thw0rted opened this issue Mar 25, 2020 · 1 comment

Comments

@thw0rted
Copy link

@thw0rted thw0rted commented Mar 25, 2020

馃殌 feature request

Relevant Package

This feature request is for @angular/common/http

Description

#27689 requests a Fetch-based backend for HttpClient. The only response thus far has been "feel free to implement it yourself". I don't actually care what backend is used. I'm trying to replace my (fetch-based) back-end interactions with HttpClient so that I can use injected mocks for testing. The problem is that I currently use several features that are not available in the existing API, like the cache and redirect options in the Request and the redirected property of Response.

Describe the solution you'd like

I'd like to see first-class Angluar support for fetch-specific features.

Describe alternatives you've considered

I'm talking to back-end APIs that I have no control over. I'm either going to have to a) stick with fetch and figure out how to test my code on my own, or b) switch to HttpClient and rewrite significant portions of my backend interactions to detect and handle redirects that I could have avoided using a simple {redirect: "error"} via native fetch.

@thw0rted

This comment has been minimized.

Copy link
Author

@thw0rted thw0rted commented Mar 25, 2020

cc #23033

@ngbot ngbot bot added this to the needsTriage milestone Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can鈥檛 perform that action at this time.