mirror of
https://github.com/sasjs/adapter.git
synced 2026-04-21 13:11:31 +00:00
fix: withXSRFToken instead of withCredentials
This commit is contained in:
@@ -50,7 +50,7 @@ export class Sas9RequestClient extends RequestClient {
|
||||
const requestConfig: AxiosRequestConfig = {
|
||||
headers,
|
||||
responseType: contentType === 'text/plain' ? 'text' : 'json',
|
||||
withCredentials: true
|
||||
withXSRFToken: true
|
||||
}
|
||||
if (contentType === 'text/plain') {
|
||||
requestConfig.transformResponse = undefined
|
||||
@@ -103,7 +103,7 @@ export class Sas9RequestClient extends RequestClient {
|
||||
}
|
||||
|
||||
return this.httpClient
|
||||
.post<T>(url, data, { headers, withCredentials: true })
|
||||
.post<T>(url, data, { headers, withXSRFToken: true })
|
||||
.then(async (response) => {
|
||||
if (response.status === 302) {
|
||||
return await this.get(
|
||||
|
||||
Reference in New Issue
Block a user