Someone that please collaborate with me in how to make a request for GET, passing values by headers since I must send the authentication token.
I try but I get the following error ERROR Error: "Uncaught (in promise): Error: StaticInjectorError(AppModule)[ProductsLibrosPage -> HttpHeaders]:StaticInjectorError(Platform: core)[ProductsLibrosPage -> HttpHeaders]:NullInjectorError: No provider for HttpHeaders!
I am passing HttpClientModule
in the app.module.ts
, I also use the implementes HttpInterceptor
and passing the Authorization
with the token but I receive the same error.
let tokenp = {
'Accept': 'application/json',
'Authorization': 'Bearer ' + ne.access_token
}
Also try with a variable but do not accept and continue with the error of No provider for HttpHeaders!
, in advance thank you very much if someone has the knowledge and helps me, I'm just beginning to be ionic.