← Back to home
Comparison · DevOps

httr2 vs xfun

A side-by-side editorial comparison of httr2 and xfun — release velocity, themes, recent moves, and the top alternatives to consider.

httr2 vs xfun: at a glance

Featurehttr2xfun
SectorDevOpsDevOps
Velocity score2.50.0
Sparks · 30d00
Top themesr, http-client, oauth, opentelemetryutilities, publishing, headless-browser, litedown
Last editorial update6h ago1h ago
WebsiteVisit →Visit →

What is httr2?

httr2 is growing production concerns: tracing, throttling and token hygiene.

httr2 is the tidyverse's modern HTTP client and the designated successor to httr. Recent releases have moved past request-building ergonomics into operational concerns — OpenTelemetry traces for every request, throttling that behaves correctly across repeated calls, and a fix for OAuth token caches that were never actually being pruned.

Read the full httr2 trajectory →

What is xfun?

Yihui's utility grab-bag is quietly growing a web server and a headless browser.

xfun is the shared utility layer under knitr, rmarkdown, bookdown and litedown, and its recent releases cluster in three places: the record() function that captures code output for litedown, a local app-serving stack built on R's internal httpd, and a headless-browser toolkit. Version 0.58 replaced direct httpd routing with a proxy and added serve_dir() and random_port(); 0.55 added browser_print() and 0.60 added browser_dom(), which runs JavaScript on a page and returns the rendered DOM.

Read the full xfun trajectory →

httr2 vs xfun: editorial side-by-side

H
httr2
DEVOPS
2.5

httr2 is growing production concerns: tracing, throttling and token hygiene.

◆ Current state

httr2 is the tidyverse's modern HTTP client and the designated successor to httr. Recent releases have moved past request-building ergonomics into operational concerns — OpenTelemetry traces for every request, throttling that behaves correctly across repeated calls, and a fix for OAuth token caches that were never actually being pruned.

◆ Where it's heading

The package is maturing into infrastructure for long-running R services rather than interactive scripts. The 1.2.0 lifecycle purge removed deprecated streaming and mocking APIs in favour of a connection-based model, and debugging affordances like httr2_translate() point at users who need to reproduce a failing request outside R.

◆ Prediction

Expect further observability and credential-handling work, with the rlang-driven cache hash change in 1.3.0 likely to surface follow-up issues as existing caches silently invalidate.

X
xfun
DEVOPS
0.0

Yihui's utility grab-bag is quietly growing a web server and a headless browser.

◆ Current state

xfun is the shared utility layer under knitr, rmarkdown, bookdown and litedown, and its recent releases cluster in three places: the record() function that captures code output for litedown, a local app-serving stack built on R's internal httpd, and a headless-browser toolkit. Version 0.58 replaced direct httpd routing with a proxy and added serve_dir() and random_port(); 0.55 added browser_print() and 0.60 added browser_dom(), which runs JavaScript on a page and returns the rendered DOM.

◆ Where it's heading

The package is accreting the infrastructure Yihui's publishing tools need rather than staying a pile of small helpers. Serving directories, allocating ports, proxying the help server, driving a headless browser and printing to PDF are all pieces of one pipeline: render R output to HTML, then get it onto a screen or into a static file without a heavyweight dependency. The rest of the release stream is release-automation tooling for the author's own CRAN workflow and a long tail of parser bug fixes in taml_load().

◆ Prediction

Expect the browser functions to consolidate into a documented interface used directly by litedown, and expect cache_rds() to be fully retired in favour of cache_exec() now that it is no longer recommended.

Alternatives to httr2 and xfun

Other DevOps products tracked by Sparkpulse, ranked by recent ship velocity. Each card links to a full editorial trajectory and lets you pivot into a head-to-head comparison with either httr2 or xfun.

See all httr2 alternatives → · See all xfun alternatives →

Recent activity from httr2 and xfun

Latest ship moves from both products, interleaved chronologically. ⚡ = editorial spark.

  1. 1mo agohttr2httr2 1.3.0 fixes OAuth token caches that never expired
  2. 1mo agoxfunbrowser_dom() added; Windows silently truncated self-contained HTML
  3. 1mo agohttr2httr2 1.2.3 translates requests into curl commands
  4. 1mo agoxfunpost_release() automates post-CRAN chores; nested math fixed
  5. 2mo agoxfunnew_app() moves to a proxy; serve_dir() and random_port() added
  6. 4mo agoxfunLiteral JavaScript in tojson(); record() bottleneck fixed
  7. 6mo agoxfunDeprecated attr() and qs support removed; parallel rev_check
  8. 8mo agoxfunbrowser_print() opens the headless-browser path
  9. 8mo agohttr2httr2 1.2.2 emits OpenTelemetry traces for every request
  10. 1y agohttr2httr2 1.2.1 stops escaping colons in paths
  11. 1y agohttr2httr2 1.2.0 removes deprecated mocking and streaming APIs
  12. 1y agohttr2httr2 1.1.2 fixes AWS request signing and header checks

Frequently asked questions

What is the difference between httr2 and xfun?

They serve adjacent needs but don't currently overlap on shipped themes. httr2 is currently shipping more aggressively (velocity 2.5 vs 0.0), with 0 editorial sparks in the last 30 days against 0. See the at-a-glance table above for a side-by-side breakdown of velocity, recent sparks, and editorial themes.

Is httr2 better than xfun?

Sparkpulse doesn't pick a winner — we score release velocity, not feature parity. httr2 is currently shipping more aggressively (velocity 2.5 vs 0.0), with 0 editorial sparks in the last 30 days against 0. For your specific use case, the alternatives sections above list other DevOps products to evaluate alongside.

What are the best alternatives to httr2?

Top httr2 alternatives in DevOps are ranked by recent ship velocity. Browse the "httr2 alternatives" section above for the current picks, or visit /alternatives/httr2 for the full list with editorial commentary on each.

What are the best alternatives to xfun?

Top xfun alternatives in DevOps are ranked by recent ship velocity. Browse the "xfun alternatives" section above for the current picks, or visit /alternatives/xfun for the full list with editorial commentary on each.