skipRetry will skip retry if the request method is POST or contains a status code that is not one of following http status codes: 500, 502, 503, 504.
(httpMethod string, response *http.Response)
| 56 | // skipRetry will skip retry if the request method is POST or contains a status |
| 57 | // code that is not one of following http status codes: 500, 502, 503, 504. |
| 58 | func (*RetryRequest) skipRetry(httpMethod string, response *http.Response) bool { |
| 59 | return httpMethod == http.MethodPost || |
| 60 | response != nil && |
| 61 | response.StatusCode != http.StatusInternalServerError && |
| 62 | response.StatusCode != http.StatusBadGateway && |
| 63 | response.StatusCode != http.StatusServiceUnavailable && |
| 64 | response.StatusCode != http.StatusGatewayTimeout |
| 65 | } |