There is such a request. But the browser does not start downloading the file? How to do it? I tried to substitute different parameters Header
public GetJobsListExcel(jobs: JobViewModel[]) {
let JobIds: number[] = [];
jobs.forEach(x => JobIds.push(x.JobId));
let body = JSON.stringify({ jobIds: JobIds });
let headers = new Headers({ 'Content-Type': 'application/json' , 'cache-control': 'no-cache' , 'postman-token': '9135e481-df69-b870-4f72-92873c1fd7de' });
let options = new RequestOptions({ headers: headers });
let url = 'http://localhost:32001/api/job/jobs-list-excel';
return this.http.post(url, body, options)
.map(res => res.json().data)
.catch(this.handleError)
.toPromise()
}