Fix cookie support in Node.js client (#895)

This commit is contained in:
delenius
2018-09-04 01:31:33 -07:00
committed by William Cheng
parent f7b807f980
commit 9d89387d83
96 changed files with 106 additions and 106 deletions

View File

@@ -417,7 +417,7 @@ class ApiClient {
// Attach previously saved cookies, if enabled
if (this.enableCookies){
if (typeof window === 'undefined') {
this.agent.attachCookies(request);
this.agent._attachCookies(request);
}
else {
request.withCredentials();
@@ -433,7 +433,7 @@ class ApiClient {
try {
data = this.deserialize(response, returnType);
if (this.enableCookies && typeof window === 'undefined'){
this.agent.saveCookies(response);
this.agent._saveCookies(response);
}
} catch (err) {
error = err;