diff --git a/lib/client.js b/lib/client.js index ebd9cf1..fbd15ff 100644 --- a/lib/client.js +++ b/lib/client.js @@ -68,7 +68,7 @@ Client.prototype.call = function(options, callback, id){ path: this.path, headers:{ 'content-type':(this.method=='POST') ? 'application/x-www-form-urlencoded' :'application/json', - 'content-length':(requestData).length + 'content-length':Buffer.byteLength(requestData) } }; if(this.authNeeded){ @@ -122,4 +122,4 @@ Client.prototype.call = function(options, callback, id){ request.end(requestData); }; -module.exports = Client; \ No newline at end of file +module.exports = Client;