I\'m trying to talk to a somewhat RESTful API from an Angular 2 frontend.
To remove some item from a collection, I need to send some other data in addition to the re
Below is an example for Angular 6
deleteAccount(email) {
const header: HttpHeaders = new HttpHeaders()
.append('Content-Type', 'application/json; charset=UTF-8')
.append('Authorization', 'Bearer ' + sessionStorage.getItem('accessToken'));
const httpOptions = {
headers: header,
body: { Email: email }
};
return this.http.delete(AppSettings.API_ENDPOINT + '/api/Account/DeleteAccount', httpOptions);
}