@aloma.io/integration-sdk 3.8.47 → 3.8.49

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.
@@ -61,7 +61,7 @@ export default class Fetcher {
61
61
  Accept: 'application/json',
62
62
  };
63
63
  }
64
- if (!options0?.headers || !options0?.headers?.['Content-type']) {
64
+ if ((!options0?.headers || !options0?.headers?.['Content-type']) && !(options0?.body instanceof FormData)) {
65
65
  options0.headers = {
66
66
  ...options0.headers,
67
67
  'Content-type': 'application/json',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloma.io/integration-sdk",
3
- "version": "3.8.47",
3
+ "version": "3.8.49",
4
4
  "description": "",
5
5
  "author": "aloma.io",
6
6
  "license": "Apache-2.0",
@@ -17,7 +17,7 @@ export default class Fetcher {
17
17
  retry?: number;
18
18
  baseUrl?: string;
19
19
  onResponse?: (response: Response) => void;
20
- customize?: (request: {[key: string]: any}) => void;
20
+ customize?: (request: { [key: string]: any }) => void;
21
21
  } = {}) {
22
22
  this.retry = retry;
23
23
  this.baseUrl = baseUrl;
@@ -68,7 +68,7 @@ export default class Fetcher {
68
68
  /**
69
69
  * request headers like Accept, Content-type
70
70
  */
71
- headers?: {[key: string]: any};
71
+ headers?: { [key: string]: any };
72
72
  /**
73
73
  * request body like "hello world" or {hello: "world"}
74
74
  */
@@ -81,7 +81,7 @@ export default class Fetcher {
81
81
  baseUrl = local.baseUrl;
82
82
  options ||= {};
83
83
 
84
- const options0: any = {...options};
84
+ const options0: any = { ...options };
85
85
 
86
86
  if (retries == null) retries = local.retry;
87
87
 
@@ -103,7 +103,7 @@ export default class Fetcher {
103
103
  };
104
104
  }
105
105
 
106
- if (!options0?.headers || !options0?.headers?.['Content-type']) {
106
+ if ((!options0?.headers || !options0?.headers?.['Content-type']) && !(options0?.body instanceof FormData)) {
107
107
  options0.headers = {
108
108
  ...options0.headers,
109
109
  'Content-type': 'application/json',
@@ -139,7 +139,7 @@ export default class Fetcher {
139
139
  }
140
140
 
141
141
  if (status === 204) {
142
- return {ok: true};
142
+ return { ok: true };
143
143
  }
144
144
 
145
145
  return unwrap(ret, options0);