You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I don't like using observables for http requests. I would like to see the "option" of using Promises. This issue sums up my feelings on the matter perfectly #471
Describe the solution you'd like
I've created a HttpPromiseModule in my project that mirrors the HttpModule but without the Observable wrapping. This module is a lot easier to work with and matches the coding style on the backend better. I have a PR I can submit if you want to see the code.
As mentioned here, our recommended way is to use Observable#471
If you want to use Promises, call .toPromise.
If you don't want to call .toPromise, you can wrap HttpService in, let's say, HttpPromiseService and just override methods, call .super() and add .toPromise() so you don't have to do it over and over again. Bringing 2 different modules for the sake of 1 method call is an overkill
Feature Request
Is your feature request related to a problem? Please describe.
I don't like using observables for http requests. I would like to see the "option" of using Promises. This issue sums up my feelings on the matter perfectly #471
Describe the solution you'd like
I've created a HttpPromiseModule in my project that mirrors the HttpModule but without the Observable wrapping. This module is a lot easier to work with and matches the coding style on the backend better. I have a PR I can submit if you want to see the code.
Teachability, Documentation, Adoption, Migration Strategy
You use it the exact same way as the HttpModule except you use the HttpPromiseModule
What is the motivation / use case for changing the behavior?
Observables for http feels wrong/overkill. Tired of adding .toPromise() on all my http requests.
The text was updated successfully, but these errors were encountered: