Clone this repo:

Branches

Tags

  1. 22002d6 Remove -dev.infinity in SDK upper constraint by Kevin Moore · 3 days ago master
  2. 40a8f35 dartfmt (#5) by Kevin Moore · 3 weeks ago
  3. df18e7a Add travis support by Kevin Moore · 7 weeks ago
  4. 1dd6b92 Add analysis_options by Kevin Moore · 7 weeks ago
  5. 8efe929 remove unused var by Kevin Moore · 7 weeks ago

http_throttle is middleware for the http package that throttles the number of concurrent requests that an HTTP client can make.

// This client allows 32 concurrent requests.
final client = new ThrottleClient(32);

Future<List<String>> readAllUrls(Iterable<Uri> urls) {
  return Future.wait(urls.map((url) {
    // You can safely call as many client methods as you want concurrently, and
    // ThrottleClient will ensure that only 32 underlying HTTP requests will be
    // open at once.
    return client.read(url);
  }));
}