[docs] added RETRY() suggestion to api-packages vignette (fixes #638) #642
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for an awesome project! I use
httr
every day, and recommend it to anyone who will listen.In this PR, I'd like to recommend an addition to the
api-packages
vignette. The vignette correctly mentions the importance of retrying failed requests and using exponential backoff w hen you do that, but it doesn't currently mention thathttr::RETRY()
already has an implementation of that and should be used. I'd like to propose an explicit call-out forRETRY()
in the vignette.For context, I'm working as part of a group at the Chicago R Collab conference this weekend, trying to improve the reliability of HTTP client packages on CRAN. We've found that many such clients use the single-shot
httr::<method>()
functions, and I suspect that that's because package authors aren't familiar withRETRY()
. We've documented a lot more about our thinking (and the contributions we've made to other projects so far) at chircollab/chircollab20#1.Thanks for your time and consideration!