You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.
// Copyright 2017 Michal Witkowski. All Rights Reserved.
// See LICENSE for licensing terms.
/*
`http_retry` is a HTTP client-side Tripperware that allows you to retry requests that are marked as idempotent and safe.
This logic works for requests considered safe and idempotent (configurable) and ones that have no body, or have `Request.GetBody` either automatically implemented (`byte.Buffer`, `string.Buffer`) or specified manually. By default all GET, HEAD and OPTIONS requests are considered idempotent and safe.
The implementation allow retries after client-side errors or returned error codes (by default 5**) according to configurable backoff policies (linear backoff by default). Additionally, requests can be hedged. Hedging works by sending additional requests without waiting for a previous one to return.