Tags: sothebys/resty
Tags
Merge pull request go-resty#340 from go-resty/dev-iteration Dev iteration
Merge pull request go-resty#314 from go-resty/release-prep-v2.2.0
Merge pull request go-resty#254 from go-resty/v2 For v2 Release
adding v2 go mod suffix and update dependency version
-
Jul 16, 2019 - a4f3548 8000
- zip
- tar.gz
fix multipart/form-data without filename and content type (go-resty#236)
change Backoff() algorithm (go-resty#237) 1) Add capabilities to handle Retry-After headers and similar info from server Motivation: some servers provide Retry-After header or similar info along with 429 or 503 status code, and it is often important to honor such information on retries, i.e. simple expotential backoff is not optimal. https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online 2) Add option NOT to retry even if operation returns an error (but retry by default, if no retry conditions are set) Motivation: error are already passed to condition callback in resty, but Backoff() still retries the request if error is not nil. It implies excessive, stillborn retries for non-retryble errors from underlying http client (i.e. with RoundTripper from oauth2). 3) Remove error return value from condition callback Motivation: this error is neither passed to caller, nor logged in any way. It is cleaner to have "needRetry == true" than "needRetry == true || conditionErr != nil". 4) Does not use floating-point arithmetics for expotential backoff Motivation: simplification & performance
PreviousNext