rest-client-sdk
Advanced tools
Comparing version 1.0.4 to 1.0.5
# Changelog | ||
## [1.0.5] - 2017-08-30 | ||
### Changed | ||
* Fix token loop when token is not valid anymore | ||
## [1.0.4] - 2017-07-28 | ||
### Changed | ||
* Remove undefined headers | ||
## [1.0.3] - 2017-07-27 | ||
@@ -4,0 +12,0 @@ ### Changed |
{ | ||
"name": "rest-client-sdk", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Rest Client SDK for API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -157,3 +157,12 @@ /* global fetch window */ | ||
return this._tokenStorage.refreshToken() | ||
.then(() => this._doFetch(input, init)) | ||
.then(() => { | ||
const params = Object.assign( | ||
{}, | ||
init, | ||
{ headers: Object.assign({}, init.headers) } | ||
); | ||
delete params.headers.Authorization; | ||
return this._doFetch(input, params); | ||
}) | ||
.catch(() => { | ||
@@ -160,0 +169,0 @@ throw new AccessDeniedError('Unable to renew access_token', response); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
731029
7872