Merge pull request #224 from jbaumbach/master
Fix headers variable in wrong scope in get()
This commit is contained in:
commit
9e27f4c128
|
@ -193,12 +193,10 @@ exports.OAuth2.prototype.getProtectedResource= function(url, access_token, callb
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.OAuth2.prototype.get= function(url, access_token, callback) {
|
exports.OAuth2.prototype.get= function(url, access_token, callback) {
|
||||||
|
var headers= {};
|
||||||
if( this._useAuthorizationHeaderForGET ) {
|
if( this._useAuthorizationHeaderForGET ) {
|
||||||
var headers= {'Authorization': this.buildAuthHeader(access_token) }
|
headers= {'Authorization': this.buildAuthHeader(access_token) }
|
||||||
access_token= null;
|
access_token= null;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
headers= {};
|
|
||||||
}
|
|
||||||
this._request("GET", url, headers, "", access_token, callback );
|
this._request("GET", url, headers, "", access_token, callback );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue