@hubs101/js-api-skd-client 1.0.10291 → 1.0.10293
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 +3 -3
- package/package.json +1 -1
package/lib/utils/api.js
CHANGED
|
@@ -353,9 +353,8 @@ const postRequestWE = (url, body, token, headers) => __awaiter(void 0, void 0, v
|
|
|
353
353
|
var _e;
|
|
354
354
|
let form;
|
|
355
355
|
if (body) {
|
|
356
|
-
if (
|
|
357
|
-
headers["Content-Type"] === "application/x-www-form-urlencoded")
|
|
358
|
-
headers["Content-Type"] === "application/json") {
|
|
356
|
+
if (headers &&
|
|
357
|
+
headers["Content-Type"] === "application/x-www-form-urlencoded") {
|
|
359
358
|
form = new URLSearchParams();
|
|
360
359
|
}
|
|
361
360
|
else {
|
|
@@ -365,6 +364,7 @@ const postRequestWE = (url, body, token, headers) => __awaiter(void 0, void 0, v
|
|
|
365
364
|
? form.append(key, JSON.stringify(body[key]))
|
|
366
365
|
: form.append(key, body[key]));
|
|
367
366
|
}
|
|
367
|
+
console.log({ form });
|
|
368
368
|
const response = yield fetch(url, {
|
|
369
369
|
method: "POST",
|
|
370
370
|
headers: token
|