@deliverart/sdk-js-core 2.1.7 → 2.1.9

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/dist/index.cjs CHANGED
@@ -149,8 +149,12 @@ function createApiClient(config) {
149
149
  let contentType = response.headers.get("Content-Type") ?? "";
150
150
  let parsedBody;
151
151
  try {
152
- if (contentType.includes("application/json")) {
153
- parsedBody = await response.json();
152
+ if (contentType.includes("application/")) {
153
+ if (contentType.includes("json")) {
154
+ parsedBody = await response.json();
155
+ } else {
156
+ parsedBody = await response.text();
157
+ }
154
158
  } else if (contentType.includes("text/")) {
155
159
  parsedBody = await response.text();
156
160
  } else {
package/dist/index.js CHANGED
@@ -110,8 +110,12 @@ function createApiClient(config) {
110
110
  let contentType = response.headers.get("Content-Type") ?? "";
111
111
  let parsedBody;
112
112
  try {
113
- if (contentType.includes("application/json")) {
114
- parsedBody = await response.json();
113
+ if (contentType.includes("application/")) {
114
+ if (contentType.includes("json")) {
115
+ parsedBody = await response.json();
116
+ } else {
117
+ parsedBody = await response.text();
118
+ }
115
119
  } else if (contentType.includes("text/")) {
116
120
  parsedBody = await response.text();
117
121
  } else {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deliverart/sdk-js-core",
3
3
  "description": "Core SDK for DeliverArt, providing essential functionalities and utilities.",
4
- "version": "2.1.7",
4
+ "version": "2.1.9",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",