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

@@ -410,7 +410,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();
@@ -425,7 +425,7 @@ class ApiClient {
try {
var data = this.deserialize(response, returnType);
if (this.enableCookies && typeof window === 'undefined'){
this.agent.saveCookies(response);
this.agent._saveCookies(response);
}
resolve({data, response});