Adapter
is the base parent class used to implement
webmockr support for different HTTP clients. It should not be used
directly. Instead, use one of the client-specific adapters that webmockr
currently provides:
CrulAdapter
for crul
HttrAdapter
for httr
Httr2Adapter
for httr2
Details
Note that the documented fields and methods are the same across all
client-specific adapters.
Super class
webmockr::Adapter
-> CrulAdapter
Public fields
client
HTTP client package name
name
adapter name
Methods
Inherited methods
Method clone()
The objects of this class are cloneable with this method.
Usage
CrulAdapter$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Super class
webmockr::Adapter
-> HttrAdapter
Public fields
client
HTTP client package name
name
adapter name
Methods
Inherited methods
Method clone()
The objects of this class are cloneable with this method.
Usage
HttrAdapter$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Super class
webmockr::Adapter
-> Httr2Adapter
Public fields
client
HTTP client package name
name
adapter name
Methods
Inherited methods
Method clone()
The objects of this class are cloneable with this method.
Usage
Httr2Adapter$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Public fields
client
HTTP client package name
name
adapter name
Methods
Method new()
Create a new Adapter object
Enable the adapter
Usage
Adapter$enable(quiet = FALSE)
Arguments
quiet
(logical) suppress messages? default: FALSE
Disable the adapter
Usage
Adapter$disable(quiet = FALSE)
Arguments
quiet
(logical) suppress messages? default: FALSE
Method handle_request()
All logic for handling a request
Usage
Adapter$handle_request(req)
Method remove_stubs()
Remove all stubs
Returns
nothing returned; removes all request stubs
Method clone()
The objects of this class are cloneable with this method.
Usage
Adapter$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.