Merge pull request #224 from jbaumbach/master
Fix headers variable in wrong scope in get()
This commit is contained in:
		| @ -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 ); | ||||||
| } | } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user