mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-11 01:14:36 +00:00
fix: added additional params to axios POST while deploy to SASJS server
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user