@hubs101/js-api-skd-client 1.0.10552 → 1.0.10555
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils/api.js +2 -1
- package/package.json +1 -1
package/lib/utils/api.js
CHANGED
|
@@ -227,7 +227,8 @@ exports.patchRequest = patchRequest;
|
|
|
227
227
|
const getRequest = (url, token, headers) => __awaiter(void 0, void 0, void 0, function* () {
|
|
228
228
|
const response = yield fetch(url, {
|
|
229
229
|
method: "GET",
|
|
230
|
-
headers:
|
|
230
|
+
headers: token
|
|
231
|
+
? Object.assign({ accept: "application/json", Authorization: `Bearer ${token}` }, headers) : Object.assign({ accept: "application/json" }, headers),
|
|
231
232
|
});
|
|
232
233
|
// console.log(`url:${url}`); // USE for performance monitoring
|
|
233
234
|
const data = yield response.json();
|