Merge pull request #224 from jbaumbach/master

Fix headers variable in wrong scope in get()
This commit is contained in:
Ciaran Jessup 2014-10-08 19:45:40 +01:00
commit 9e27f4c128
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 );
}