1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-09 05:20:05 +00:00

chore(imprvements): code changes for fileUploader

This commit is contained in:
Saad Jutt
2021-09-13 07:30:26 +05:00
parent 2cfba99bda
commit ec9dbd7ad6
6 changed files with 33 additions and 56 deletions

View File

@@ -182,7 +182,7 @@ export class RequestClient implements HttpClient {
})
}
public post<T>(
public async post<T>(
url: string,
data: any,
accessToken: string | undefined,
@@ -286,7 +286,7 @@ export class RequestClient implements HttpClient {
result: response.data,
etag: response.headers['etag'] as string
}
} catch (e) {
} catch (e: any) {
const response = e.response as AxiosResponse
if (response?.status === 403 || response?.status === 449) {
this.parseAndSetFileUploadCsrfToken(response)