Retryable HTTP client with configurable options for request delay, random jitter, and exponential backoff.
go get github.com/cholland1989/go-retryable
This library supports version 1.20 and later of Go.
import "github.com/cholland1989/go-retryable/pkg/retryable"
import "github.com/cholland1989/go-retryable/pkg/unofficial"
Package retryable
provides a retryable HTTP client with configurable options for request delay,
random jitter, and exponential backoff.
request, err := http.NewRequest(http.MethodGet, "https://www.github.com/", nil)
if err != nil {
log.Fatal(err)
}
response, err := retryable.DefaultClient.Do(request)
if err != nil {
log.Fatal(err)
}
defer response.Body.Close()
Package unofficial
provides constants for well-known HTTP status codes that are not part of the
official specification.
See the documentation for more details.
Released under the MIT License.