From 7d2b41049615531241bcae3cd3baa67e81c07757 Mon Sep 17 00:00:00 2001 From: Shweta Jain Date: Tue, 21 Nov 2017 15:35:36 +0530 Subject: [PATCH] Remove content length and resolve type-error issue --- lib/loggly/client.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/loggly/client.js b/lib/loggly/client.js index b57e59a..0f3fef4 100644 --- a/lib/loggly/client.js +++ b/lib/loggly/client.js @@ -157,8 +157,7 @@ Loggly.prototype.log = function (msg, tags, callback) { host: this.host, accept: '*/*', 'user-agent': this.userAgent, - 'content-type': this.json ? 'application/json' : 'text/plain', - 'content-length': Buffer.byteLength(JSON.stringify(msg)) + 'content-type': this.json ? 'application/json' : 'text/plain' } };