httr 1.2.0
This article is originally published at https://www.rstudio.com/blog/
httr 1.2.0 is now available on CRAN. The httr package makes it easy to talk to web APIs from R. Learn more in the quick start vignette. Install the latest version with:
install.packages("httr")
There are a few small new features:
New
RETRY()
function allows you to retry a request multiple times until it succeeds, if you you are trying to talk to an unreliable service. To avoid hammering the server, it uses exponential backoff with jitter, as described in https://www.awsarchitectureblog.com/2015/03/backoff.html.DELETE()
gains a body parameter.encode = "raw"
parameter to functions that accept bodies. This allows you to do your own encoding.http_type()
returns the content/mime type of a request, sans parameters.
There is one important bug fix:
- No longer uses use custom requests for standard
POST
requests. This has the side-effect of properly following redirects afterPOST
, fixing some login issues in rvest.
httr 1.2.1 includes a fix for a small bug that I discovered shortly after releasing 1.2.0.
For the complete list of improvements, please see the release notes.
Thanks for visiting r-craft.org
This article is originally published at https://www.rstudio.com/blog/
Please visit source website for post related comments.