Fix csv donwload timeout after 10 secs, caused by the call

This commit is contained in:
Konstantinos Triantafyllou 2022-11-09 11:27:41 +02:00
parent ed20502959
commit ae1c91855d
1 changed files with 2 additions and 10 deletions

View File

@ -13,19 +13,11 @@ export class ReportsService {
//On the service:
downloadCSVFile(url: string){
//var headers = new Headers();
//headers.append('responseType', 'arraybuffer');
return this.http.get(url, {responseType: 'text'})
.pipe(
timeout(10000),
map(res => new Blob([res], { type: 'text/csv' })));
return this.http.get(url, {responseType: 'text'}).pipe(map(res => new Blob([res], { type: 'text/csv' })));
}
getCSVResponse(url: string){
//var headers = new Headers();
//headers.append('responseType', 'arraybuffer');
return this.http.get(url, {responseType: 'text'})
.pipe(timeout(10000));
//.pipe(map(res => res));
}
/**