Angular 5 download excel file with post request
I am facing an issue where I have downloaded an Excel file with Angular 1 but if I am implementing the same code in Angular 5 it is showing the error that your file is corrupted. My response is in ArrayBuffer and I am unable to read the file. Below is my code: Service: DownloadData(model:requiredParams):Observable<any>{ const headers = new Headers(); const requestOptions = new RequestOptions({ headers: headers }); requestOptions.headers.append('Content-Type', 'application/json'); const body = JSON.stringify(model); return this.http.post(url, body, requestOptions) .map((res:any) => res) .catch(