Skip to content

Can one client accommodate options in multiple situations? #736

Answered by slessard
Qyuee asked this question in Q&A
Discussion options

You must be logged in to vote

This likely could be accomplished by adding a retry condition func to the request

	client := resty.New()
	req := client.R()
	req.AddRetryCondition(func(response *resty.Response, err error) bool {
		if response.Request.Attempt > 3 {
			return false
		}
		return true
	})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Qyuee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants