Make HTTP Request by Get in IONIC, to api de laravel sending token

0

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.

    
asked by YILMAR ANDRES VEGA GOMEZ 08.05.2018 в 03:22
source

0 answers