Skip to content
This repository was archived by the owner on Feb 13, 2018. It is now read-only.

Commit 8832cb9

Browse files
author
Tim Whitlock
committed
semantic change using get when posting
1 parent 5c12e32 commit 8832cb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/twitter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ TwitterClient.prototype._call = function( requestMethod, requestUri, requestArgs
344344
Authorization: authHeader,
345345
'User-Agent': TWITTER_API_USERAGENT
346346
};
347+
http.method = requestMethod;
347348
if( 'POST' === requestMethod ){
348-
http.method = 'POST';
349349
http.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
350350
http.headers['Content-Length'] = query.length;
351351
}
@@ -363,7 +363,7 @@ TwitterClient.prototype._call = function( requestMethod, requestUri, requestArgs
363363
http.port = this.proxy.port;
364364
}
365365
}
366-
var req = require('https').get( http, callback );
366+
var req = require('https').request( http, callback );
367367
req.setSocketKeepAlive( true );
368368
if( timeout ){
369369
req.on('socket', function (socket) {

0 commit comments

Comments
 (0)