From e599d29787d4bb70b24b1b219482eff49f36d9cd Mon Sep 17 00:00:00 2001 From: Derek Brooks Date: Tue, 15 Oct 2013 00:53:34 +0000 Subject: [PATCH] Write the post_body to OAuth2 PUT requests --- lib/oauth2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oauth2.js b/lib/oauth2.js index 32c8aae..39efa43 100644 --- a/lib/oauth2.js +++ b/lib/oauth2.js @@ -129,7 +129,7 @@ exports.OAuth2.prototype._executeRequest= function( http_library, options, post_ callback(e); }); - if( options.method == 'POST' && post_body ) { + if( (options.method == 'POST' || options.method == 'PUT') && post_body ) { request.write(post_body); } request.end();