-
-
Notifications
You must be signed in to change notification settings - Fork 771
Closed
Description
Retry comes with a nice retry system.
For monitoring reason, I would like to be able when I get a response, how many attempts Resty has to do to complete the request.
Something like that:
client := resty.New()SetRetryCount(3).OnAfterResponse(func(c *resty.Client, resp *resty.Response) error {
metrics.ReportHTTPCall(resp.StatusCode(),resp.Request.Method, somewhere.NumberOfAttempt())
return nil
})
Is there a way to get that value?