1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-17 17:10:05 +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', 'SASjsApi/drive/deploy',
{ fileTree: members, appLoc: appLoc }, { fileTree: members, appLoc: appLoc },
access_token access_token,
undefined,
{},
{ maxContentLength: Infinity, maxBodyLength: Infinity }
) )
return Promise.resolve(result) return Promise.resolve(result)

View File

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