I'm doing this course in udemy about building 12 different angular 2 apps, and one of them works with Spotify Web API and I'm adding more features to it;
I've learn how to work with simple GET request like
searchMusic(str:string, type='artist'){
this.searchUrl = 'https://api.spotify.com/v1/search?query='+str+'&offset=0&limit=20&type='+type+'&market=US';
return this._http.get(this.searchUrl)
.map(res => res.json());
}
That function requires no auth key
But to get a playlist I need to pass an auth key to the request, otherwise I get an error instead of a Json formatted playlist
How do you append the auth key to the request to get rid of the error?
Thanks!