commit | 544feddd342568cfa7b2129b9caadb7cd7bffd50 | [log] [tgz] |
---|---|---|
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | Wed Mar 02 11:13:33 2022 -0800 |
committer | GitHub <noreply@github.com> | Wed Mar 02 11:13:33 2022 -0800 |
tree | 11ec348d8c69d4e6f12dc68e22c40cc1715cc2db | |
parent | 7b505c8eeaf8c3818a5bb1862ae67625a8c6f1f7 [diff] |
Bump actions/checkout from 2 to 3 (#22) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Middleware for the http
package that transparently retries failing requests.
To use this, just create an RetryClient
that wraps the underlying http.Client
:
import 'package:http/http.dart' as http; import 'package:http_retry/http_retry.dart'; Future<void> main() async { final client = RetryClient(http.Client()); try { print(await client.read('http://example.org')); } finally { client.close(); } }
By default, this retries any request whose response has status code 503 Temporary Failure up to three retries. It waits 500ms before the first retry, and increases the delay by 1.5x each time. All of this can be customized using the RetryClient()
constructor.