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.
- package/dist/index.js +2 -0
- 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 {
|