v3: fallbackto authWithHeaders if wuthWithSession or authWithUrl fails

This commit is contained in:
Matteo Pagliazzi
2016-05-18 18:29:38 +02:00
parent ef9dc9a15a
commit f0f67e1e88
3 changed files with 16 additions and 9 deletions

View File

@@ -64,13 +64,6 @@ function _requestMaker (user, method, additionalSets = {}) {
return reject(parsedError);
}
// if any cookies was sent, save it for the next request
if (response.headers['set-cookie']) {
additionalSets.cookie = response.headers['set-cookie'].map(cookieString => {
return cookieString.split(';')[0];
}).join('; ');
}
resolve(_parseRes(response));
});
});