commit | a1db430fb6e2fcb29830e8092252cd00b8780e92 | [log] [tgz] |
---|---|---|
author | Natalie Weizenbaum <nweiz@google.com> | Thu Jul 16 13:24:36 2015 -0700 |
committer | Natalie Weizenbaum <nweiz@google.com> | Thu Jul 16 13:24:36 2015 -0700 |
tree | c84e619417f13d67fc49d17bd533a1dcd0371769 | |
parent | 747ac6f4e6f7cfe0733164e1d2e24b2dab3bc337 [diff] |
Upgrade to the new test runner. R=rnystrom@google.com Review URL: https://codereview.chromium.org//1234313004 .
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); })); }