On the server there is a cors filter. In chrome in the developer’s panel comes a response from the server with all the headers. For some reason, my code can't get the header and prints null.
login(user: User) { return this.http.post(this.loginURL, { "type": "User", "id": null, "login": user.login, "password": user.password }, {observe: 'response'} ) .subscribe(resp => { console.log(resp.body['token']); console.log(resp.headers.get('Authorization')); } ); } body ['token'] is normally output to the console. A header can not be obtained.
resp.body.token- GVArt