Add gitignore, status, and codereview files.
3 files changed
tree: 1279261d0a0b5dff0d019413e54a03b1448ed9e8
  1. lib/
  2. test/
  3. .gitignore
  4. .status
  5. codereview.settings
  6. LICENSE
  7. pubspec.yaml
  8. README.md
README.md

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);
  }));
}