Package: webmockr 1.0.2.91

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_1.0.2.91.tar.gz
webmockr_1.0.2.91.zip(r-4.5)webmockr_1.0.2.91.zip(r-4.4)webmockr_1.0.2.91.zip(r-4.3)
webmockr_1.0.2.91.tgz(r-4.4-any)webmockr_1.0.2.91.tgz(r-4.3-any)
webmockr_1.0.2.91.tar.gz(r-4.5-noble)webmockr_1.0.2.91.tar.gz(r-4.4-noble)
webmockr_1.0.2.91.tgz(r-4.4-emscripten)webmockr_1.0.2.91.tgz(r-4.3-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'))

Peer review:

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

On CRAN:

httphttpsapiweb-servicescurlmockmockingfakewebhttp-mockingtestingtesting-toolstddhttp-mock

55 exports 49 stars 7.52 score 14 dependencies 1 dependents 121 scripts 3.1k downloads

Last updated 12 hours agofrom:ec4df33650 (on main). Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 15 2024
R-4.5-winOKOct 15 2024
R-4.5-linuxOKOct 15 2024
R-4.4-winOKOct 15 2024
R-4.4-macOKOct 15 2024
R-4.3-winOKOct 15 2024
R-4.3-macOKOct 15 2024

Exports:%>%AdapterBodyPatternbuild_crul_requestbuild_crul_responsebuild_httr_requestbuild_httr_responsebuild_httr2_requestbuild_httr2_responseCrulAdapterdisableenableenabledexcludingHashCounterHeadersPatternHttpLibAdapaterRegistryhttr_mockhttr2_mockHttr2AdapterHttrAdapterincludingMethodPatternmock_filepluck_bodyremove_request_stubrequest_registryrequest_registry_clearRequestPatternRequestRegistryRequestSignatureResponsestub_registrystub_registry_clearstub_requestStubbedRequestStubCounterStubRegistryto_raiseto_returnto_return_to_timeoutUriPatternwebmockr_allow_net_connectwebmockr_configurationwebmockr_configurewebmockr_configure_resetwebmockr_crul_fetchwebmockr_disablewebmockr_disable_net_connectwebmockr_enablewebmockr_net_connect_allowedwebmockr_resetwi_thwi_th_

Dependencies:base64enccrulcurlfauxpashttpcodejsonlitemagrittrmimeR6Rcpprlangtriebeardurltoolswhisker

Readme and manuals

Help Manual

Help pageTopics
Build a crul requestbuild_crul_request
Build a crul responsebuild_crul_response
Build a httr requestbuild_httr_request
Build a httr responsebuild_httr_response
Build an httr2 requestbuild_httr2_request
Build a httr2 response ('httr2_response')build_httr2_response
Adapters for Modifying HTTP RequestsAdapter CrulAdapter Httr2Adapter HttrAdapter
Enable or disable webmockrdisable enable enabled
HashCounterHashCounter
HttpLibAdapaterRegistryHttpLibAdapaterRegistry
Turn on 'httr' mockinghttr_mock
Turn on 'httr2' mockinghttr2_mock
Partially match request query parameters or request bodiesexcluding including partial
Mock filemock_file
Mocking writing to diskmocking-disk-writing
Extract the body from an HTTP requestpluck_body
Remove a request stubremove_request_stub
List or clear requests in the request registryrequest_registry request_registry_clear
RequestPattern classRequestPattern
RequestRegistryRequestRegistry
RequestSignatureRequestSignature
ResponseResponse
List stubs in the stub registrystub_registry
stub_registry_clearstub_registry_clear
Stub an http requeststub_request
StubbedRequestStubbedRequest
StubCounterStubCounter
StubRegistryStubRegistry
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