You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My program send message to Slack channel via slack-go, I used a Resty as a custom http client and set it retry 3 times, but the retry function does not work with slack-go.
I changed to another http client retryablehttp, the retry function works well with slack-go.
I studied retryablehttp code found that StandardClient returns a stdlib *http.Client with a custom Transport, which shims in a *retryablehttp.Client for added retries. But resty.GetClient just return c.httpClient, can resty.GetClient implement the same retry function? thank you.
@rts-gordon Thanks for reaching out. If I recall correctly, resty.GetClient is the underlying Go HTTP client instance returned as-is. The returned client does not accommodate all the Resty feature(s) today.
Can you fork the Resty, add the implementation, and test it? If it works as-is, you could submit a PR. Otherwise, I will consider it part of the v3 design.
My program send message to Slack channel via slack-go, I used a Resty as a custom http client and set it retry 3 times, but the retry function does not work with slack-go.
I changed to another http client retryablehttp, the retry function works well with slack-go.
slack-go code:
Resty httpClient:
I studied retryablehttp code found that StandardClient returns a stdlib *http.Client with a custom Transport, which shims in a *retryablehttp.Client for added retries. But resty.GetClient just return c.httpClient, can resty.GetClient implement the same retry function? thank you.
Versions
Go: v1.22
slack-go/slack: v0.12.5
Resty: v2.12.0
retryablehttp: v0.7.5
The text was updated successfully, but these errors were encountered: