Clone this repo:

Branches

  1. 284344c Get rid of all the library tags. by Natalie Weizenbaum · 1 year, 3 months ago master
  2. a1db430 Upgrade to the new test runner. by Natalie Weizenbaum · 1 year, 9 months ago
  3. 747ac6f added author to pubspec by Kevin Moore · 2 years, 3 months ago
  4. a81f08b Update the pubspec's homepage link. by Natalie Weizenbaum · 2 years, 4 months ago
  5. c21cc70 Add gitignore, status, and codereview files. by Natalie Weizenbaum · 2 years, 4 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);
  }));
}