Clone this repo:

Branches

  1. d12e945 Fix a Dart 2 type error. Prepare for release. by Kevin Moore · 2 days ago master 1.0.2
  2. d1fb225 Update .gitignore by Kevin Moore · 2 days ago
  3. a219d00 Remove upper case constants (#6) by Lasse R.H. Nielsen · 2 days ago
  4. 22002d6 Remove -dev.infinity in SDK upper constraint by Kevin Moore · 8 months ago
  5. 40a8f35 dartfmt (#5) by Kevin Moore · 9 months 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);
  }));
}