[Feature Request] - for the httpclient keep toPromise method after rxjs 7 (removed in rxjs 8)
See original GitHub issueπ feature request
Relevant Package
This feature request is for @angular/common/http
Description
https://indepth.dev/rxjs-heads-up-topromise-is-being-deprecated/
Describe the solution youβd like
It looks like rxjs
topromise
is being deprecated. Could we have this method keep in the http client? It will again breaking and useless refactor, while has a valid method for the http client.
Describe alternatives youβve considered
We would not like to refactor our codebase because rxjs
will be breaking again and it is not adding an additional method after rxjs
topromise
is removed in rxjs
v8
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:10 (7 by maintainers)
Top Results From Across the Web
How to fix Angular HttpClient toPromise() deprecated (rxjs)
In most cases, for HttpClient, you want to use rxjs's firstValueFrom() since the HttpClient Observable s typically only return one value anyway.
Read more >RxJS heads up: toPromise is being deprecated - InDepth.Dev
In RxJS 7 toPromise will become deprecated and with RxJS 8 it will be ... we make HTTP requests using the built in...
Read more >ToPromise Deprecated In RxJS 7 - Upmostly
RXJS 7 was recently released to much fan fare, but buried deep inside the release was the deprecation of the βtoPromise()β method on...
Read more >Rxjs toPromise() deprecated - Stack Overflow
As mentioned here, these are the main reasons why toPromise is being deprecated: One goal was to remove it from the Observable prototype...
Read more >Angular Basics: How To Use HttpClient in Angular - Telerik
Let's look at what is HttpClient and how to use it in Angular, including a review of HTTP GET, POST, PUT and DELETE...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
By the way, a migration from toPromise to lastValueFrom can very likely be done automatically through a code migration. IMO that should be more than sufficient.
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.