Fix headers variable in wrong scope in get()

This commit is contained in:
John Baumbach 2014-10-08 18:35:52 +00:00
parent 69b0b7c3e8
commit 9419b00441
1 changed files with 2 additions and 4 deletions

View File

@ -193,12 +193,10 @@ exports.OAuth2.prototype.getProtectedResource= function(url, access_token, callb
}
exports.OAuth2.prototype.get= function(url, access_token, callback) {
var headers= {};
if( this._useAuthorizationHeaderForGET ) {
var headers= {'Authorization': this.buildAuthHeader(access_token) }
headers= {'Authorization': this.buildAuthHeader(access_token) }
access_token= null;
}
else {
headers= {};
}
this._request("GET", url, headers, "", access_token, callback );
}