Package: webmockr 2.1.0

Scott Chamberlain

webmockr: Stubbing and Setting Expectations on 'HTTP' Requests

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.

Authors:Scott Chamberlain [aut, cre], Aaron Wolen [ctb], rOpenSci [fnd]

webmockr_2.1.0.tar.gz
webmockr_2.1.0.zip(r-4.6)webmockr_2.1.0.zip(r-4.5)webmockr_2.1.0.zip(r-4.4)
webmockr_2.1.0.tgz(r-4.5-any)webmockr_2.1.0.tgz(r-4.4-any)
webmockr_2.1.0.tar.gz(r-4.6-any)webmockr_2.1.0.tar.gz(r-4.5-any)
webmockr_2.1.0.tgz(r-4.5-emscripten)webmockr_2.1.0.tgz(r-4.4-emscripten)
webmockr.pdf |webmockr.html
webmockr/json (API)
NEWS

# Install 'webmockr' in R:
install.packages('webmockr', repos = c('https://packages.ropensci.org', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ropensci/webmockr/issues

Pkgdown site:https://docs.ropensci.org

On CRAN:

Conda:

httphttpsapiweb-servicescurlmockmockingfakewebhttp-mockingtestingtesting-toolstddhttp-mock

8.59 score 49 stars 1 packages 125 scripts 5.0k downloads 45 exports 12 dependencies

Last updated 6 days ago from:e7294d50ab (on main). Checks:7 ERROR, 4 OK. Indexed: yes.

TargetResultTotal time
linux-devel-x86_64ERROR136
pkgdown docsOK181
source / vignettesOK180
linux-release-x86_64ERROR133
macos-release-arm64ERROR66
macos-oldrel-arm64ERROR82
windows-develERROR122
windows-releaseERROR109
windows-oldrelERROR120
wasm-releaseOK116
wasm-oldrelOK131

Exports:%>%build_crul_responsebuild_httr_responsebuild_httr2_requestbuild_httr2_responseCrulAdapterdisableenableenabledexcludinghttr_mockhttr2_mockHttr2AdapterHttrAdapterincludinglast_requestlast_stubmock_filepluck_bodyremove_request_stubrequest_registryrequest_registry_clearRequestPatternRequestSignatureResponsestub_body_diffstub_registrystub_registry_clearstub_requestto_raiseto_returnto_return_to_timeoutwebmockr_allow_net_connectwebmockr_configurationwebmockr_configurewebmockr_configure_resetwebmockr_crul_fetchwebmockr_disablewebmockr_disable_net_connectwebmockr_enablewebmockr_net_connect_allowedwebmockr_resetwi_thwi_th_

Dependencies:clicurlfauxpashttpcodejsonlitemagrittrR6Rcpprlangtriebeardurltoolswhisker

Readme and manuals

Help Manual

Help pageTopics
Enable or disable webmockrdisable enable enabled
Turn on 'httr' mockinghttr_mock
Turn on 'httr2' mockinghttr2_mock
Partially match request query parameters or request bodiesexcluding including partial
Get the last HTTP request madelast_request
Get the last stub createdlast_stub
Mock filemock_file
Mocking writing to diskmocking-disk-writing
Remove a request stubremove_request_stub
List or clear requests in the request registryrequest_registry request_registry_clear
RequestPattern classRequestPattern
Get a diff of a stub request body and a request body from an http requeststub_body_diff
List stubs in the stub registrystub_registry
stub_registry_clearstub_registry_clear
Stub an http requeststub_request
Set raise error conditionto_raise
Expectation for what's returned from a stubbed requestto_return
Set timeout as an expected return on a matchto_timeout
webmockr configurationwebmockr_allow_net_connect webmockr_configuration webmockr_configure webmockr_configure_reset webmockr_disable_net_connect webmockr_net_connect_allowed
webmockr_resetwebmockr_reset
Defunct functions in 'webmockr'webmockr-defunct
Set additional parts of a stubbed requestwi_th