diff --git a/lib/oauth2.js b/lib/oauth2.js index a182794..e8a661f 100644 --- a/lib/oauth2.js +++ b/lib/oauth2.js @@ -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 ); }