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))
.subscribe({
next: response => {
const blob = new Blob([response], { type: 'application/csv' });
const blob = new Blob([response], { type: 'text/csv' });
saveAs(blob, 'deltagare-export.csv');
this.fetchIsLoading$.next(false);
},

View File

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