httptest2: Test Helpers for 'httr2'

Testing and documenting code that communicates with remote servers can be painful. This package helps with writing tests for packages that use 'httr2'. It enables testing all of the logic on the R sides of the API without requiring access to the remote service, and it also allows recording real API responses to use as test fixtures. The ability to save responses and load them offline also enables writing vignettes and other dynamic documents that can be distributed without access to a live server.

Version: 1.1.0
Imports: digest, httr2, jsonlite, rlang, stats, testthat, utils
Suggests: curl, knitr, pkgload, rmarkdown, spelling, webfakes, xml2
Published: 2024-04-26
DOI: 10.32614/CRAN.package.httptest2
Author: Neal Richardson ORCID iD [aut, cre], Jonathan Keane [ctb], Maƫlle Salmon ORCID iD [ctb]
Maintainer: Neal Richardson <neal.p.richardson at>
License: MIT + file LICENSE
NeedsCompilation: no
Language: en-US
Materials: README NEWS
CRAN checks: httptest2 results


Reference manual: httptest2.pdf
Vignettes: Frequently Asked Questions
httptest: A Test Environment for HTTP Requests in R
Redacting and Modifying Recorded Requests
Writing Vignettes with APIs


Package source: httptest2_1.1.0.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): httptest2_1.1.0.tgz, r-oldrel (arm64): httptest2_1.1.0.tgz, r-release (x86_64): httptest2_1.1.0.tgz, r-oldrel (x86_64): httptest2_1.1.0.tgz
Old sources: httptest2 archive

Reverse dependencies:

Reverse suggests: allcontributors, biomaRt, bskyr, comtradr, congress, f1dataR, feltr, gptzeror, happign, insight, nixtlar, osmapiR, osmdata, planscorer, restatis, riem, Rigma, rirods, rosv


Please use the canonical form to link to this page.