@squadbase/connectors 0.0.9 → 0.0.10

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/dist/index.js +7 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2835,12 +2835,15 @@ Authentication is handled automatically using username and password.`,
2835
2835
  const controller = new AbortController();
2836
2836
  const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS5);
2837
2837
  try {
2838
+ const headers = {
2839
+ "X-Cybozu-Authorization": authToken
2840
+ };
2841
+ if (body) {
2842
+ headers["Content-Type"] = "application/json";
2843
+ }
2838
2844
  const response = await fetch(url, {
2839
2845
  method,
2840
- headers: {
2841
- "X-Cybozu-Authorization": authToken,
2842
- "Content-Type": "application/json"
2843
- },
2846
+ headers,
2844
2847
  body: body ? JSON.stringify(body) : void 0,
2845
2848
  signal: controller.signal
2846
2849
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squadbase/connectors",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "Squadbase Connectors",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",