Fix headers variable in wrong scope in get()
This commit is contained in:
parent
69b0b7c3e8
commit
9419b00441
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue