hashicorp / go-retryablehttp

Retryable HTTP client in Go
Mozilla Public License 2.0
1.99k stars 251 forks source link

Support NewRequestWithContext #125

Closed kevinburke1 closed 3 years ago

kevinburke1 commented 3 years ago

Go added http.NewRequestWithContext in go 1.13 which fixes several of the issues with the original http.NewRequest in terms of instantiating the *http.Request with saner defaults and avoiding the need to copy if you want to set a *context.Context on the request.

It would be nice if this library supported that behavior.

ryanuber commented 3 years ago

This sounds like a good idea to me. I'd be happy to review a PR!

kevinburke1 commented 3 years ago

should be one here: https://github.com/hashicorp/go-retryablehttp/pull/126