Added support for GET when requesting request tokens
This commit is contained in:
@ -460,16 +460,21 @@ exports.OAuth.prototype.post= function(url, oauth_token, oauth_token_secret, pos
|
||||
}
|
||||
|
||||
exports.OAuth.prototype.getOAuthRequestToken= function(extraParams, callback) {
|
||||
var httpMethod;
|
||||
if( typeof extraParams == "function" ){
|
||||
callback = extraParams;
|
||||
extraParams = {};
|
||||
}
|
||||
|
||||
if( typeof callback == "string"){
|
||||
httpMethod = callback;
|
||||
}
|
||||
|
||||
// Callbacks are 1.0A related
|
||||
if( this._authorize_callback ) {
|
||||
extraParams["oauth_callback"]= this._authorize_callback;
|
||||
}
|
||||
this._performSecureRequest( null, null, "POST", this._requestUrl, extraParams, null, null, function(error, data, response) {
|
||||
this._performSecureRequest( null, null, httpMethod || "POST", this._requestUrl, extraParams, null, null, function(error, data, response) {
|
||||
if( error ) callback(error);
|
||||
else {
|
||||
var results= querystring.parse(data);
|
||||
|
Reference in New Issue
Block a user