CrulAdapter | R Documentation |
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
Note that the documented fields and methods are the same across all client-specific adapters.
webmockr::Adapter
-> CrulAdapter
client
HTTP client package name
name
adapter name
clone()
The objects of this class are cloneable with this method.
CrulAdapter$clone(deep = FALSE)
deep
Whether to make a deep clone.
webmockr::Adapter
-> HttrAdapter
client
HTTP client package name
name
adapter name
clone()
The objects of this class are cloneable with this method.
HttrAdapter$clone(deep = FALSE)
deep
Whether to make a deep clone.
webmockr::Adapter
-> Httr2Adapter
client
HTTP client package name
name
adapter name
clone()
The objects of this class are cloneable with this method.
Httr2Adapter$clone(deep = FALSE)
deep
Whether to make a deep clone.
client
HTTP client package name
name
adapter name
new()
Create a new Adapter object
Adapter$new()
enable()
Enable the adapter
Adapter$enable(quiet = FALSE)
quiet
(logical) suppress messages? default: FALSE
TRUE
, invisibly
disable()
Disable the adapter
Adapter$disable(quiet = FALSE)
quiet
(logical) suppress messages? default: FALSE
FALSE
, invisibly
handle_request()
All logic for handling a request
Adapter$handle_request(req)
req
a request
various outcomes
remove_stubs()
Remove all stubs
Adapter$remove_stubs()
nothing returned; removes all request stubs
clone()
The objects of this class are cloneable with this method.
Adapter$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.