Problem with header returned Angular and Ionic

0

I'm having a problem developing an app with Ionic, and when I request the token on the server it returns a header that has the following argument:

 Authorization →Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqYWpvc2VAZ21haWwuY29tIiwiZXhwIjoxNTI2MDg1NDMyfQ.UODVBrQP6iSCMveRdUlq_K9pTAkW5OV3tBm0hL88K8_dMeyBfXKi0HFMweRx7UQBm4deVz2121EQ15Ey2SB8wg

But I can not get it through the angle:

this.http.post(this.server.link + "login",  this.data,)
.subscribe(function(data) {
  console.log(data)
});

The above code returns me this in the console:

Response{  
      _body:"",
      status:200,
      ok:true,
      statusText:"OK",
      headers:Headers,
…
}
headers:Headers 
    _headers:Map(3){  
        "pragma"    => Array(1),
        "cache-control"    => Array(1),
        "expires"    => Array(1)
}
_normalizedNames:Map(3){  
"pragma"    => "pragma",
"cache-control"    => "cache-control",
"expires"    => "expires"
}
__proto__:Object

But "Authorization" does not appear, which is what I need to generate the token.

What can I do?

    
asked by anonymous 12.05.2018 / 02:41

0 answers