@serialized/serialized-client
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -16,2 +16,4 @@ "use strict"; | ||
__export(require("./FeedsClient")); | ||
var SERIALIZED_ACCESS_KEY_HEADER = 'Serialized-Access-Key'; | ||
var SERIALIZED_SECRET_ACCESS_KEY_HEADER = 'Serialized-Secret-Access-Key'; | ||
var Serialized = /** @class */ (function () { | ||
@@ -41,4 +43,15 @@ function Serialized() { | ||
Accept: 'application/json', | ||
}, | ||
} | ||
}); | ||
axiosClient.interceptors.response.use(function (response) { | ||
return response; | ||
}, function (error) { | ||
if (error.config.headers[SERIALIZED_ACCESS_KEY_HEADER]) { | ||
error.config.headers[SERIALIZED_ACCESS_KEY_HEADER] = '******'; | ||
} | ||
if (error.config.headers[SERIALIZED_SECRET_ACCESS_KEY_HEADER]) { | ||
error.config.headers[SERIALIZED_SECRET_ACCESS_KEY_HEADER] = '******'; | ||
} | ||
return Promise.reject(error); | ||
}); | ||
return new Serialized_1.SerializedInstance(config, axiosClient); | ||
@@ -45,0 +58,0 @@ }; |
@@ -6,3 +6,3 @@ { | ||
"author": "Mattias Holmqvist", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"main": "dist/index.js", | ||
@@ -9,0 +9,0 @@ "types": "dist/index.d.ts", |
@@ -15,4 +15,6 @@ # Serialized Javascript & Typescript client | ||
First, install the Serialized TS/JS client via the [npm](https://www.npmjs.com/get-npm) package manager: | ||
Register for a free account at https://serialized.io to get your access keys to the API (if you haven't already). | ||
Install the Serialized TS/JS client via the [npm](https://www.npmjs.com/get-npm) package manager: | ||
```bash | ||
@@ -19,0 +21,0 @@ npm install @serialized/serialized-client |
57388
1200
64