commit | 8e95308566f72af3e58ae54325f3ee0d08f9ed6f | [log] [tgz] |
---|---|---|
author | Kevin Moore <kevmoo@users.noreply.github.com> | Fri Oct 26 16:35:20 2018 |
committer | GitHub <noreply@github.com> | Fri Oct 26 16:35:20 2018 |
tree | b9274d6047caede1725e469b87c3c7982cf0b64b | |
parent | a0370ae7fd11f2b04237ead5c766acb723d9a8b3 [diff] |
Support the latest pkg:http, prepare for release (#9)
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); })); }