question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
Airbladercommented, Jun 13, 2020

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.

0reactions
angular-automatic-lock-bot[bot]commented, Jul 31, 2021

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.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found