I am trying to download a model in an Excel file using Angular. Below is the code for my service function:
getExcelReport(data: myModel[]): Observable<Blob> {
let params = new HttpParams()
.set('myParam', JSON.stringify(data));
return this.Http.get(this.url + '/MyController/GetExcelReport', { params: params, observe: "body", responseType: "blob" });
However, when I call it, I receive an error message: 415 (Unsupported Media Type). Can anyone suggest the correct syntax to use? Thank you.