1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 09:24:35 +00:00

Merge pull request #654 from sasjs/axios-setting-for-larger-deploy-to-sasjs-server

fix: added additional params to axios POST while deploy to SASJS server
This commit is contained in:
Allan Bowe
2022-02-22 13:21:12 +02:00
committed by GitHub
2 changed files with 11 additions and 3 deletions

View File

@@ -37,7 +37,10 @@ export class SASjsApiClient {
}>(
'SASjsApi/drive/deploy',
{ fileTree: members, appLoc: appLoc },
access_token
access_token,
undefined,
{},
{ maxContentLength: Infinity, maxBodyLength: Infinity }
)
return Promise.resolve(result)

View File

@@ -207,7 +207,8 @@ export class RequestClient implements HttpClient {
data: any,
accessToken: string | undefined,
contentType = 'application/json',
overrideHeaders: { [key: string]: string | number } = {}
overrideHeaders: { [key: string]: string | number } = {},
additionalSettings: { [key: string]: string | number } = {}
): Promise<{ result: T; etag: string }> {
const headers = {
...this.getHeaders(accessToken, contentType),
@@ -215,7 +216,11 @@ export class RequestClient implements HttpClient {
}
return this.httpClient
.post<T>(url, data, { headers, withCredentials: true })
.post<T>(url, data, {
headers,
withCredentials: true,
...additionalSettings
})
.then((response) => {
throwIfError(response)