Skip to content

s-norris/go-retryablehttp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

go-retryablehttp

Forked from hashicorp/go-retryablehttp

Updated to allow the latest response body to be saved and accessible after client.Do() finishes. This helps if you need to read/inspect the body in a CheckRetry function, but then still want access to the body after Do() completes.

Example use case: A specific response code is provided in a body when an auth token has expired from system A. In this case you want to drop out of the retry mechanism to obtain a new token as retrying with the old one is pointless. However, having read the body already the reader is empty when Do() completes so the calling function cannot determine whether a new token is required or not.

About

Retryable HTTP client in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%