hashicorp / go-retryablehttp

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

Add StatusServiceUnavailable to Retry-After check in DefaultBackoff #131

Closed vancluever closed 3 years ago

vancluever commented 3 years ago

This adds StatusServiceUnavailable (error 503) to the codes checked for the Retry-After header in DefaultBackoff.

This is a valid header to honor for 503 responses. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After