Access to the http-headers of the Wordpress API using Angular 2

0

I have a very simple question on Angular 2 .

I have an application that connects to Wordpress API Rest and I have a problem that I think is very simple, but I can not find a solution on the web.

I need to retrieve the data that comes in the link in the API I'm accessing, data that comes as total posts and page quantity, I know what the parameters are, but I can not access them.

How do I access information in the Header?

Here is the code for the method that makes the request:

getNoticias(page: number) {
    return this._http.get(this._apiUrl + "noticias/?page=" + page, { headers: this.getHeaders()})
           .map(res => res.json())
           .catch(this.throwError);
}
    
asked by anonymous 13.03.2017 / 15:56

0 answers