We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backoff
From my testing, if you try to read the response body in the Backoff function, you get an error:
http2: response body closed
Is there any way to access the response body within that function? (In our case, the 'retry after' information is in the body of the response)
The code I'm testing is:
func newClient() http.Client { retryClient := retryablehttp.NewClient() retryClient.RetryMax = 3 retryClient.Backoff = LisaTest return retryClient } func TestBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration { if resp != nil { var target map[string]interface{} err := json.NewDecoder(resp.Body).Decode(&target) spew.Dump(err) spew.Dump(target) } return 1 * time.Second }
I could well be being thick here - would love to know if we're missing something simple (or it's some part of our implementation that I've missed)!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
From my testing, if you try to read the response body in the
Backoff
function, you get an error:Is there any way to access the response body within that function? (In our case, the 'retry after' information is in the body of the response)
The code I'm testing is:
I could well be being thick here - would love to know if we're missing something simple (or it's some part of our implementation that I've missed)!
The text was updated successfully, but these errors were encountered: