From 8840c3d5ccee629f15e2fc3d4a58a5228d9dc807 Mon Sep 17 00:00:00 2001 From: MaSimon Date: Fri, 2 Nov 2018 16:38:51 +0530 Subject: [PATCH 1/2] Fix for issue #47 --- lib/apicontrollersbase.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/apicontrollersbase.js b/lib/apicontrollersbase.js index 46f170d..d7e14fd 100644 --- a/lib/apicontrollersbase.js +++ b/lib/apicontrollersbase.js @@ -85,7 +85,7 @@ class APIOperationBase { method: 'POST', headers: { 'Content-Type': 'application/json', - 'Content-Length': this._request.length + 'Content-Length': Buffer.byteLength(JSON.stringify(this._request)) }, json: true, timeout: config.timeout, From 86c3f3847b597fab9b6ea215ded1cf8e59cfd75b Mon Sep 17 00:00:00 2001 From: MaSimon Date: Tue, 6 Nov 2018 15:57:24 +0530 Subject: [PATCH 2/2] Fix for issue #47 --- lib/apicontrollersbase.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/apicontrollersbase.js b/lib/apicontrollersbase.js index d7e14fd..7b0255d 100644 --- a/lib/apicontrollersbase.js +++ b/lib/apicontrollersbase.js @@ -83,10 +83,6 @@ class APIOperationBase { var reqOpts = { url: this._endpoint, method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(JSON.stringify(this._request)) - }, json: true, timeout: config.timeout, body: this._request