diff --git a/lib/client.js b/lib/client.js index c89fbc8..e30c3b4 100644 --- a/lib/client.js +++ b/lib/client.js @@ -80,7 +80,7 @@ client.prototype.request = function(method, path, params, callback){ if(["POST", "PUT"].indexOf(http_options["method"]) >= 0){ http_options["headers"] = { "Content-Type": params["contentType"] ? params["contentType"] : "application/json", - "Content-Length": body.length, + "Content-Length": Buffer.byteLength(body), }; }