Created
August 8, 2011 11:53
-
-
Save thomasboyt/1131628 to your computer and use it in GitHub Desktop.
Request Manager Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i=0; i < 10; i++) { | |
reqManager.createReq({ | |
url: "https://api.github.com/repos/jquery/jquery/pulls/" + i + "?callback=?", | |
type: "get", | |
dataType: "jsonp", | |
// callback for when this request has completed | |
onSuccess: savePullRequest | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var reqManager = $.reqManager({ | |
totalRequests: 10, | |
// callback for when all requests have completed | |
onFinished: downloadsFinished | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment