Skip to content

webmockr

Stubbing and Setting Expectations on 'HTTP' Requests

v2.2.0 · Jul 20, 2025 · MIT + file LICENSE

Description

Stubbing and setting expectations on 'HTTP' requests. Includes tools for stubbing 'HTTP' requests, including expected request conditions and response conditions. Match on 'HTTP' method, query parameters, request body, headers and more. Can be used for unit tests or outside of a testing context.

Downloads

CRAN

4.7K

Last 30 days

1728th

16K

Last 90 days

66.5K

Last year

Trend: -22.1% (30d vs prior 30d)

r2u CRAN

65

Last 30 days

347

Last 90 days

1.1K

Last year

Trend: -27% (30d vs prior 30d)

autoCRAN

2

Last 7 days

24

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 8, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 7, 2026
ERROR r-devel-linux-x86_64-debian-gcc

tests

Running ‘test-all.R’ [5s/4s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > library("testthat")
  > test_check("webmockr")
  Loading required package: webmockr
  Starting 2 test processes.
  > test-Httr2Adapter.R: 
  > test-Httr
...[truncated]...
       └─base::lapply(...)
   15.               └─testthat (local) FUN(X[[i]], ...)
   16.                 └─private$handle_error(msg, i)
   17.                   └─cli::cli_abort(...)
   18.                     └─rlang::abort(...)
  Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (25)

Dependency Network

Dependencies Reverse dependencies curl jsonlite magrittr R6 urltools (>= 1.6.0) fauxpas rlang cli CepalStatR MolgenisArmadillo RTD archiveRetriever citecorp connectwidgets crul laOpenData lambdr magmaR mtaOpenData nasapower nycOpenData omophub openaq +10 more reverse deps webmockr

Version History

22 tracked
new 2.2.0 Mar 10, 2026
updated 2.2.0 ← 2.1.0 diff Jul 20, 2025
updated 2.1.0 ← 2.0.0 diff Jun 28, 2025
updated 2.0.0 ← 1.0.0 diff Feb 10, 2025
updated 1.0.0 ← 0.9.0 diff Jul 22, 2024
updated 0.9.0 ← 0.8.2 diff Feb 27, 2023
updated 0.8.2 ← 0.8.0 diff Aug 27, 2022
updated 0.8.0 ← 0.7.4 diff Mar 13, 2021
updated 0.7.4 ← 0.7.0 diff Dec 8, 2020
updated 0.7.0 ← 0.6.2 diff Sep 29, 2020
updated 0.6.2 ← 0.6.0 diff Mar 23, 2020
updated 0.6.0 ← 0.5.0 diff Mar 1, 2020
updated 0.5.0 ← 0.4.0 diff Dec 3, 2019
updated 0.4.0 ← 0.3.4 diff Aug 8, 2019
updated 0.3.4 ← 0.3.0 diff Feb 8, 2019