vcr
looks for similarity in your HTTP requests to cached requests. You
can set what is examined about the request with one or more of the
following options:
body
headers
host
method
path
query
uri
By default, we use method
(HTTP method, e.g., GET
) and uri
(test for exact match against URI, e.g., http://foo.com
).
You can set your own options by tweaking the match_requests_on
parameter:
unlink(file.path(cassette_path(), "one.yml"))
use_cassette(name = "one", { cli$post("post", body = list(a = 5)) }, match_requests_on = c('method', 'headers', 'body') )
For more details refer to the request matching vignette.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.