httr 1.4.0

  r-lib, httr

  Mara Averick

We’re well pleased to announce the release of httr 1.4.0. The goal of httr is to provide a wrapper for the curl package, customised to the demands of modern web APIs.

The httr 1.4.0 release includes improved flexibility for OAuth 2.0, new and updated demos, and several minor changes and improvements — the full details of which can be found in the changelog.

OAuth 2.0 improvements

OAuth 2.0 has been made somewhat more flexible in order to support more websites. init_oauth2.0() now passes use_basic_auth onward, enabling basic authentication for OAuth 2.0. oauth2.0_token() and init_oauth2.0() have gained two new arguments:

  • oob_value specifies the value to use for the redirect_uri parameter when retrieving an authorization URL, necessary when using “out-of-band” (oob) configuration.
  • query_authorize_extra makes it possible to add extra query parameters to the authorization URL, as is required by some APIs.

Scopes are now de-duplicated, sorted and stripped of names before being hashed for on-disk token retrieval. This eliminates a source of hash mismatch that could cause new tokens to be requested, even when existing tokens had the necessary scope.

Demo updates

Thanks to Christophe Dervieux, a new demo for OAuth 1.0a’s one-legged authentication mechanism has been added, using the Noun Project API.

The Faceboook demo now uses device flow. This means that you can continue to use the Facebook API from R under their new security policy.

The Vimeo demo has been updated to use OAuth 2.0.

Acknowledgements

Thank you to the 69 contributors who made this release possible: @aazaff, @alex-hioperator, @barryrowlingson, @billdenney, @bradyte, @braggbear, @brennanpincardiff, @cameronbracken, @cderv, @ChrisMuir, @cosmomeese, @cranknasty, @cschroed-usgs, @cstawitz, @ctrombley, @dcldmartin, @dfv-ms, @dkulp2, @drewabbot, @EOneita, @ErezLo, @FelixMailoa, @giuseppec, @hadley, @Hong-Revo, @infinitetrial, @Isaacsh, @j-Rinehart, @JacquesBonet, @jennybc, @jguerrero77, @JhossePaul, @jlegewie, @jmwerner, @jthomp1818, @KaranKhullar, @karigunnarsson, @klarakaleb, @kokomoo, @krlmlr, @l-ts, @leonardo-murano, @maalsol, @mmuurr, @moloscripts, @mtmorgan, @mvkorpel, @Nosferican, @paulgarnes, @peterdesmet, @peterhartman, @picousse, @pohzipohzi, @porfila, @potterzot, @ramnov, @sajukassim, @sasajuratovic, @Sb9309, @shrektan, @skirmer, @stefanfritsch, @StevenMMortimer, @swanderz, @swood-ecology, @tjpalanca, @TuanTran07, @viddagrava, and @wsphd.