Angular 2 download .CSV file click event with authentication
问题 I'm using a spring boot backend and my api uses a service to send data via an OutputStreamWriter. I can download this in Angular 2 using a click event like so: Typescript results(){ window.location.href='myapicall'; } HTML <button (click)="results()" class="btn btn-primary">Export</button> This works just fine; however, I recently implemented security for my api endpoints and now I am receiving a 401 everytime I try to make the call because it's not sending a header. I wrote a service that I