@hubs101/js-api-skd-client 1.0.10461 → 1.0.10462

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.
Files changed (2) hide show
  1. package/lib/utils/api.js +7 -1
  2. package/package.json +1 -1
package/lib/utils/api.js CHANGED
@@ -99,7 +99,13 @@ exports.getRequestSimple = getRequestSimple;
99
99
  const deleteRequest = (url, body, token, headers) => __awaiter(void 0, void 0, void 0, function* () {
100
100
  let form;
101
101
  if (body) {
102
- form = new FormData();
102
+ if (headers &&
103
+ headers["Content-Type"] === "application/x-www-form-urlencoded") {
104
+ form = new URLSearchParams();
105
+ }
106
+ else {
107
+ form = new FormData();
108
+ }
103
109
  Object.keys((0, exports.trimUndefined)(body)).forEach((key) => Array.isArray(body[key])
104
110
  ? form.append(key, JSON.stringify(body[key]))
105
111
  : form.append(key, body[key]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10461",
3
+ "version": "1.0.10462",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",