Here is my error after executing this code
getSecret() {
var token='06a92668-966c-4ac0-9566-830c34720150';
let header = new Headers();
header.append('Authorization', 'Bearer ' + token);
this.http.get(`http://localhost:9090/rest/branches/`,{headers: header}).map(res => res.json())
.subscribe(
data => this.branche = data,
err => err
);
}
error
(index):1 XMLHttpRequest cannot load http://localhost:9090/rest/branches/. Response for preflight has invalid HTTP status code 401