Closed Tiagogv closed 7 years ago
Hi,
it can already today be used together with the new HttpClient and it will very soon internally make use of it too.
Wishes, Manfred
This module requires Http & can not accept HttpClient. There is no mention to HttpClient in the code. This is the service constructor:
constructor( private http: Http, private urlHelper: UrlHelperService)
After OAuthModule import into AppModule, all of the components are giving this error:
ERROR Error: No provider for Http!
Both modules can be imported at the same tiime, but they are large & there is no need for both of them.
Yes, that is right. For now, you also need the @angular/http package. It's currently a peer dependency.
But this does not prevent your application from using the HttpClient. When the new release of angular-oauth2-oidc uses HttpClient too, you can remove the dependency to @angular/http and save some bytes.
Scheduled for the next version. Will land next month.
@dalu Not sure. Seems like an extension for me. Beginning with 4.3 we have two Http Solutions in Angular. Using the older one is not necessarily an issue. But as it will be deprecated soon, it's really a good idea to switch over to the new one.
@dalu Http is going to be deprecated in V5
Good point. That's also why I plan it for the next release that comes some days after Version 5. This will be a new major release as switching peer dependencies can be seen as a breaking change.
btw, there is a library, angular2-jwt, taking care the interception part already. So I guess you just need to change Http to HttpClient.
thx!
When are you going to add the new HttpClient of angular (angular/common/http) instead of angular/http ?