Clone this repo:
  1. a0370ae chore: set max SDK version to <3.0.0 (#8) by Patrice Chalin · 4 weeks ago master 1.0.3
  2. d12e945 Fix a Dart 2 type error. Prepare for release. by Kevin Moore · 3 months ago 1.0.2
  3. d1fb225 Update .gitignore by Kevin Moore · 3 months ago
  4. a219d00 Remove upper case constants (#6) by Lasse R.H. Nielsen · 3 months ago
  5. 22002d6 Remove -dev.infinity in SDK upper constraint by Kevin Moore · 11 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);
  }));
}