# NOT RUN {
library(vcr)
library(crul)
vcr_configure(dir = tempdir())
webmockr::webmockr_allow_net_connect()
(x <- insert_cassette(name = "leo5"))
current_cassette()
x$new_recorded_interactions
cli <- crul::HttpClient$new(url = "https://httpbin.org")
cli$get("get")
x$new_recorded_interactions
# very important when using inject_cassette: eject when done
x$eject() # same as eject_cassette("leo5")
# cleanup
unlink(file.path(tempdir(), "leo5.yml"))
# }
Run the code above in your browser using DataCamp Workspace