gorequest
gorequest copied to clipboard
Retry implementation is wrong
https://github.com/parnurzeal/gorequest/blob/develop/gorequest.go#L1102
for {
resp, body, errs = s.getResponseBytes()
if errs != nil {
return nil, nil, errs
}
if s.isRetryableRequest(resp) {
resp.Header.Set("Retry-Count", strconv.Itoa(s.Retryable.Attempt))
break
}
}
s.getResponseBytes() will be executing the http request. Any error set in s.Errors or errs is not nil isRetryableRequest()
check is not performed.
Any retry set to the SuperAgent object is not considered.