Clone this repo:
  1. 8e95308 Support the latest pkg:http, prepare for release (#9) by Kevin Moore · 3 weeks ago master 1.0.4
  2. a0370ae chore: set max SDK version to <3.0.0 (#8) by Patrice Chalin · 4 months ago 1.0.3
  3. d12e945 Fix a Dart 2 type error. Prepare for release. by Kevin Moore · 6 months ago 1.0.2
  4. d1fb225 Update .gitignore by Kevin Moore · 6 months ago
  5. a219d00 Remove upper case constants (#6) by Lasse R.H. Nielsen · 6 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);
  }));
}