commit | 284344cd357e435c6c8ff9a4a21f02b9e384a541 | [log] [tgz] |
---|---|---|
author | Natalie Weizenbaum <nweiz@google.com> | Tue Jan 12 17:21:20 2016 -0800 |
committer | Natalie Weizenbaum <nweiz@google.com> | Tue Jan 12 17:21:20 2016 -0800 |
tree | 669a49afa6261a20257d1b22cc95b11e05412d74 | |
parent | a1db430fb6e2fcb29830e8092252cd00b8780e92 [diff] |
Get rid of all the library tags. R=rnystrom@google.com Review URL: https://codereview.chromium.org//1580943003 .
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); })); }