Angular 2: Http Post Request With Url Parameters And Body Type Parameter
I am trying to make an HTTP POST request with Angular 2 as below. saveUserSelection() { var json = JSON.stringify({access_token: localStorage.getItem('access_token')}); var
Solution 1:
This should do what you want:
headers.append('Content-Type', 'application/json' );
headers.append('access_token', localStorage.getItem('access_token'));
Post a Comment for "Angular 2: Http Post Request With Url Parameters And Body Type Parameter"