MCPcopy Create free account
hub / github.com/imroc/req / AddRetryCondition

Method AddRetryCondition

request.go:1226–1230  ·  view source on GitHub ↗

AddRetryCondition adds a retry condition, which determines whether the request should retry.

(condition RetryConditionFunc)

Source from the content-addressed store, hash-verified

1224// AddRetryCondition adds a retry condition, which determines whether the
1225// request should retry.
1226func (r *Request) AddRetryCondition(condition RetryConditionFunc) *Request {
1227 ro := r.getRetryOption()
1228 ro.RetryConditions = append(ro.RetryConditions, condition)
1229 return r
1230}
1231
1232// SetClient change the client of request dynamically.
1233func (r *Request) SetClient(client *Client) *Request {

Callers 2

TestAddRetryConditionFunction · 0.80
AddRetryConditionFunction · 0.80

Calls 1

getRetryOptionMethod · 0.95

Tested by 1

TestAddRetryConditionFunction · 0.64