This is my first post.
I\'ve just started learning Go and Angular and I\'m attempting to connect the angular app to a go api. I\'ve written both and am stuck identi
In case you don't want to add interceptor, this worked for me:
var header = { headers: new HttpHeaders() .set('Authorization', `Basic ${btoa(AuthService.getToken())}`) } this.http.get(url, header)
For Bearer,
set('Authorization', `Bearer ${AuthService.getToken()}`)