From 1ff67ed93c91a76d560c5ba0228fe5f9428f30ed Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Tue, 22 Feb 2022 16:09:15 +0500 Subject: [PATCH] fix: added additional params to axios POST while deploy to SASJS server --- src/SASjsApiClient.ts | 5 ++++- src/request/RequestClient.ts | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/SASjsApiClient.ts b/src/SASjsApiClient.ts index 58d7c9f..4a4050c 100644 --- a/src/SASjsApiClient.ts +++ b/src/SASjsApiClient.ts @@ -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) diff --git a/src/request/RequestClient.ts b/src/request/RequestClient.ts index 208da39..4f0dcb9 100644 --- a/src/request/RequestClient.ts +++ b/src/request/RequestClient.ts @@ -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(url, data, { headers, withCredentials: true }) + .post(url, data, { + headers, + withCredentials: true, + ...additionalSettings + }) .then((response) => { throwIfError(response)