octokit / octokit.js

The all-batteries-included GitHub SDK for Browsers, Node.js, and Deno.
MIT License
6.94k stars 1.02k forks source link

Have to call GitHubApi.new between each request #26

Closed rchampourlier closed 12 years ago

rchampourlier commented 12 years ago

Hi,

I'm using this module to access Github through API v3. When I run several successive requests for the same function, the request is always performed using the same URL. The URL does not get updated because the block.url gets updated with the first request, and thus cannot be updated with the values for the requests coming after.

You can have a look at this gist which provides two examples, correct.js and wrong.js showing how reloading the GitHubApi object corrects the issue.

Environment:

mikedeboer commented 12 years ago

Thanks so much for reporting this! I know that encountering these kind of issues can be confusing and time-consuming...

It should be fixed in 2bc25c3

rchampourlier commented 12 years ago

Well, thanks a lot to you for the ultra-fast correction ;)