forked from loafle/openapi-generator-original
Fix cookie support in Node.js client (#895)
This commit is contained in:
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user