Fix csv donwload timeout after 10 secs, caused by the call
This commit is contained in:
parent
ed20502959
commit
ae1c91855d
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue