Skip to content

Commit

Permalink
No need for Buffer.byteLength anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
citizensas committed Jan 9, 2015
1 parent bc8150e commit 47691d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = function(Api) {
if (params) {
if (requestHasData(options.method)) {
options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
options.headers['Content-Length'] = Buffer.byteLength(params);
options.headers['Content-Length'] = params.length;
}
else {
options.path += '?' + params;
Expand Down

0 comments on commit 47691d0

Please sign in to comment.