From ae1c91855daad20dec85afb06cc7bcb4b93bb837 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 9 Nov 2022 11:27:41 +0200 Subject: [PATCH] Fix csv donwload timeout after 10 secs, caused by the call --- services/reports.service.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/services/reports.service.ts b/services/reports.service.ts index 4fbf20da..84b19088 100644 --- a/services/reports.service.ts +++ b/services/reports.service.ts @@ -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)); } /**