Skip to contents

webmockr

High level overview of package

webmockr-package webmockr
webmockr
webmockr-defunct
Defunct functions in webmockr

Configuration

Enable/Disable webmockr

enable() enabled() disable()
Enable or disable webmockr
httr_mock()
Turn on httr mocking Sets a callback that routes httr request through webmockr

Stub and Request registries

stub_registry()
List stubs in the stub registry
stub_registry_clear()
stub_registry_clear
StubRegistry
StubRegistry
request_registry() request_registry_clear()
List or clear requests in the request registry
RequestRegistry
RequestRegistry
webmockr_reset()
webmockr_reset

Stubbing requests

StubbedRequest
StubbedRequest
stub_request()
Stub an http request
remove_request_stub()
Remove a request stub
to_raise()
Set raise error condition
to_return()
Expectation for what's returned from a stubbed request
to_timeout()
Set timeout as an expected return on a match
wi_th()
Set additional parts of a stubbed request

Mocking writing to disk

mock_file()
Mock file
mocking-disk-writing
Mocking writing to disk

HTTP package adapters and utilities

CrulAdapter HttrAdapter Adapter
Adapters for Modifying HTTP Requests
HttpLibAdapaterRegistry
HttpLibAdapaterRegistry
build_crul_request()
Build a crul request
build_crul_response()
Build a crul response
build_httr_request()
Build a httr request
build_httr_response()
Build a httr response

Internal utilities

RequestPattern
RequestPattern class
RequestSignature
RequestSignature
HashCounter
HashCounter
StubCounter
StubCounter
pluck_body()
Extract the body from an HTTP request
Response
Response