-
-
Notifications
You must be signed in to change notification settings - Fork 771
Closed
Labels
Milestone
Description
Hi there,
I noticed that retries are configured per client,
is there any reason not to be per request?
Should I always create a new client each time I want to change RetryCount, RetryMaxWaitTime or RetryCondition without affecting one another if it runs concurrently?
For example:
defaultClient := resty.New()
func One() error{
client.
defaultClient.SetRetryCount(3).SetRetryMaxWaitTime(20 * time.Second)
defaultClient.R().Post........
}
func Two() error{
client.
defaultClient.SetRetryCount(5).SetRetryMaxWaitTime(10* time.Second)
defaultClient.R().Post........
}
in that case I should create a new instance for each function, right ?