- name
The name of the cassette. This is used to name a file on
disk, so it must be valid file name.
- package
Package name.
- record
Record mode. This will be "once"
if package
is under
development, (i.e. loaded by devtools) and "none"
otherwise. This makes
it easy to record during development and ensure that cassettes HTTP
requests are never made on CRAN.
To re-record all cassettes, you can delete inst/_vcr
then run
pkgdown::build_reference(lazy = FALSE)
.
- match_requests_on
Character vector of request matchers used to
determine which recorded HTTP interaction to replay. The default matches
on the "method"
, "uri"
, and either "body"
(if present)
or "body_json"
(if the content-type is application/json
).
The full set of possible values are:
method
: the HTTP method.
uri
: the complete request URI, excluding the port.
uri_with_port
: the complete request URI, including the port.
host
: the host component of the URI.
path
: the path component of the URI.
query
: the query component of the URI.
body
: the request body.
body_json
: the request body, parsed as JSON.
header
: all request headers.
If more than one is specified, all components must match in order for the
request to match. If not supplied, defaults to c("method", "uri")
.
Note that the request header and body will only be included in the
cassette if match_requests_on
includes "header" or "body" respectively.
This keeps the recorded request as lightweight as possible.
- serialize_with
(string) Which serializer to use:
"yaml"
(the default), "json"
, or "qs2"
.
- preserve_exact_body_bytes
(logical) Force a binary (base64)
representation of the request and response bodies? By default, vcr
will look at the Content-Type
header to determine if this is necessary,
but if it doesn't work you can set preserve_exact_body_bytes = TRUE
to
force it.
- re_record_interval
(integer) How frequently (in seconds) the
cassette should be re-recorded. Default: NULL
(not re-recorded).