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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] [Fetch API] Support for JavaScript fetch API #27689

Open
kaushiksamanta opened this issue Dec 15, 2018 · 10 comments
Open

[Feature Request] [Fetch API] Support for JavaScript fetch API #27689

kaushiksamanta opened this issue Dec 15, 2018 · 10 comments
Labels
area: common/http feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Milestone

Comments

@kaushiksamanta
Copy link

It would be nice to have support for fetch API built into httpClient module.
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

@dawidgarus
Copy link

Fell free to implement custom HttpBackend that uses Fetch API. For what I know, not all features can be implemented using fetch - there are issues with upload progress indication.

@alxhub
Copy link
Member

alxhub commented May 17, 2021

With the deprecation of IE11, there are no technical blockers to a fetch based backend that I'm aware of.

@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Jun 4, 2021
@angular-robot
Copy link
Contributor

angular-robot bot commented Jun 4, 2021

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.

@angular-robot
Copy link
Contributor

angular-robot bot commented Jun 27, 2021

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.

@angular-robot angular-robot bot added the feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors label Jun 27, 2021
@alxhub alxhub added this to Inbox in Feature Requests via automation Jul 15, 2021
@alxhub alxhub moved this from Inbox to Backlog in Feature Requests Jul 15, 2021
@jimmywarting
Copy link

not all features can be implemented using fetch - there are issues with upload progress indication.

Well, there are issues with XHR as well, you can't get a readable stream for instances...
and what do you mean by all? the only thing i can really think of is progress event
fetch can be aborted using abortSignal

and progress can somewhat be monitored for progress if you can pipe the readable stream through a transform stream that calculates bytes that has passed through. but it is not the best solution as you need to know content-length and then it can not be compressed using gzip, deflate or br. It's not the best solution but something that kind of work in user land

@alxhub alxhub removed the feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors label Feb 1, 2022
@alxhub alxhub moved this from Backlog to Needs Project Proposal in Feature Requests Feb 1, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 1, 2022

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.

@angular-robot angular-robot bot added feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors and removed feature: votes required Feature request which is currently still in the voting phase labels Feb 1, 2022
@dylhunn dylhunn removed the feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors label Sep 29, 2022
@dylhunn
Copy link
Contributor

dylhunn commented Sep 29, 2022

The different design assumptions of fetch as compared to XHR means it's not a drop-in replacement with HTTPClient, and design changes would be needed. Until we do so, however, you can just use fetch on its own without HTTPClient, of course.

@thw0rted
Copy link

@dylhunn the main reason I switched from using fetch directly to using HTTPClient was that the latter is easy to stub out for testing, while the former would require that I start injecting a fetch alias with a token, then find or write a library for mocking requests during testing.

@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Sep 30, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Sep 30, 2022

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.

@angular-robot angular-robot bot added feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors and removed feature: votes required Feature request which is currently still in the voting phase labels Sep 30, 2022
@jessicajaniuk jessicajaniuk added feature: under consideration Feature request for which voting has completed and the request is now under consideration and removed feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors labels Oct 3, 2022
@jessicajaniuk
Copy link
Contributor

This issue will be used for future considerations for potential redesign of HttpClient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: common/http feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Projects
Feature Requests
Needs Project Proposal
Development

No branches or pull requests

9 participants