(This article was first published on RStudio Blog, and kindly contributed to R-bloggers)
We’re happy to announce a new version of httr, a package designed to make it easy to work with web APIs. Httr is a wrapper around RCurl, and provides:
- functions for the most important http verbs:
GET,HEAD,PATCH,PUT,DELETEandPOST. - automatic cookie handing across requests, connection sharing, and standard SSL config.
- a request object which captures the body of the request along with request status, cookies, headers, timings and other useful information.
- easy ways to access the response as a raw vector, a character vector, or parsed into an R object (for html, xml, json, png and jpeg).
- wrapper functions for the most common configuration options:
set_cookies,add_headers,authenticate,use_proxy,verbose,timeout. - support for OAuth 1.0 and 2.0. Use
oauth1.0_tokenandoauth2.0_tokento get user tokens, andsign_oauth1.0andsign_oauth2.0to sign requests. The demos directory has six demos of using OAuth: three for 1.0 (linkedin, twitter and vimeo) and three for 2.0 (facebook, github, google).
Track httr’s development on github, and see what’s new in this version.
To leave a comment for the author, please follow the link and comment on his blog: RStudio Blog.
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

Zero Inflated Models and Generalized Linear Mixed Models with R.
Zuur, Saveliev, Ieno (2012).