AddRetryCondition adds a retry condition, which determines whether the request should retry.
(condition RetryConditionFunc)
| 1224 | // AddRetryCondition adds a retry condition, which determines whether the |
| 1225 | // request should retry. |
| 1226 | func (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. |
| 1233 | func (r *Request) SetClient(client *Client) *Request { |