Registry / http-client / hashicorp-go-retryablehttp

hashicorp-go-retryablehttp

JSON →
library0.7.8gogounverified

Package retryablehttp provides a familiar HTTP client interface with automatic retries and exponential backoff.

go get github.com/hashicorp/go-retryablehttp
INSTALL
IMPORT
SIG · HASHICORP-GO-RETRY
H
hashicorp-go-retryablehttp
http-clientgov0.7.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

retryablehttp
github.com/hashicorp/go-retryablehttp

Make an HTTP GET request with automatic retries.

package main import ( "fmt" "github.com/hashicorp/go-retryablehttp" ) func main() { client := retryablehttp.NewClient() resp, err := client.Get("https://example.com") if err != nil { panic(err) } defer resp.Body.Close() fmt.Println("Status:", resp.Status) }
Debug
Known issues
gotchaDefault retry policy may cause unexpected delays; configure max retries and backoff as needed.
fix
Set RetryMax and RetryWaitMin/Max to suit your use case.
affects: all
Upgrade
Version history
0.7.8latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources