Changed GET to POST for export

This commit is contained in:
Erik Tiekstra
2021-11-08 10:35:46 +01:00
parent b9a14ef3cd
commit ce03134fdf
2 changed files with 2 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ export class DeltagareExportComponent {
.pipe(take(1)) .pipe(take(1))
.subscribe({ .subscribe({
next: response => { next: response => {
const blob = new Blob([response], { type: 'application/csv' }); const blob = new Blob([response], { type: 'text/csv' });
saveAs(blob, 'deltagare-export.csv'); saveAs(blob, 'deltagare-export.csv');
this.fetchIsLoading$.next(false); this.fetchIsLoading$.next(false);
}, },

View File

@@ -23,7 +23,7 @@ export class ExportApiService {
}; };
return this.httpClient return this.httpClient
.get<Blob>(`${this._apiBaseUrl}/deltagare`, { params, responseType: 'blob' as 'json' }) .post<Blob>(`${this._apiBaseUrl}/deltagare`, { params, responseType: 'blob' as 'json' })
.pipe( .pipe(
catchError((error: Error) => { catchError((error: Error) => {
throw new CustomError({ throw new CustomError({