apinow-sdk 0.11.13 → 0.11.14

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 +2 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -176,6 +176,8 @@ class ApiNow {
176
176
  if (opts.data) {
177
177
  console.error(`txResponse: Setting data as body for ${method} request:`, opts.data);
178
178
  fetchOptions.body = JSON.stringify(opts.data);
179
+ // Set Content-Length header
180
+ fetchOptions.headers['Content-Length'] = String(new TextEncoder().encode(fetchOptions.body).length);
179
181
  }
180
182
  }
181
183
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apinow-sdk",
3
- "version": "0.11.13",
3
+ "version": "0.11.14",
4
4
  "description": "ApiNow SDK · The endpoint vending machine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",