Package: vcr 1.6.0.91

Scott Chamberlain

vcr: Record 'HTTP' Calls to Disk

Record test suite 'HTTP' requests and replays them during future runs. A port of the Ruby gem of the same name (<https://github.com/vcr/vcr/>). Works by hooking into the 'webmockr' R package for matching 'HTTP' requests by various rules ('HTTP' method, 'URL', query parameters, headers, body, etc.), and then caching real 'HTTP' responses on disk in 'cassettes'. Subsequent 'HTTP' requests matching any previous requests in the same 'cassette' use a cached 'HTTP' response.

Authors:Scott Chamberlain [aut, cre], Aaron Wolen [aut], Maƫlle Salmon [aut], Daniel Possenriede [aut], rOpenSci [fnd]

vcr_1.6.0.91.tar.gz
vcr_1.6.0.91.zip(r-4.5)vcr_1.6.0.91.zip(r-4.4)vcr_1.6.0.91.zip(r-4.3)
vcr_1.6.0.91.tgz(r-4.4-any)vcr_1.6.0.91.tgz(r-4.3-any)
vcr_1.6.0.91.tar.gz(r-4.5-noble)vcr_1.6.0.91.tar.gz(r-4.4-noble)
vcr_1.6.0.91.tgz(r-4.4-emscripten)vcr_1.6.0.91.tgz(r-4.3-emscripten)
vcr.pdf |vcr.html
vcr/json (API)
NEWS

# Install 'vcr' in R:
install.packages('vcr', repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ropensci/vcr/issues

Datasets:
  • crul_request - An HTTP request as prepared by the 'crul' package

On CRAN:

httphttpsapiweb-servicescurlmockmockinghttp-mockingtestingtesting-toolstddunit-testingvcr

41 exports 78 stars 4.09 score 28 dependencies 2.4k downloads

Last updated 3 days agofrom:edf96532ae (on main)

Exports:as.cassetteas.cassettepathCassettecassette_pathcassettescheck_cassette_namescurrent_cassetteeject_cassettehttp_interactionsHTTPInteractionHTTPInteractionListinsert_cassettePersistersreal_http_connections_allowedRequestrequest_summaryRequestHandlerRequestHandlerCrulRequestHandlerHttrRequestHandlerHttr2RequestMatcherRegistryresponse_summaryserializer_fetchSerializersskip_if_vcr_offturn_offturn_onturned_offturned_onUnhandledHTTPRequestErroruse_cassetteuse_vcrvcr_config_defaultsvcr_configurationvcr_configurevcr_configure_resetvcr_last_errorvcr_log_filevcr_log_infovcr_test_pathVcrResponse

Dependencies:askpassbase64encclicrulcurlfauxpasgluehttpcodehttrhttr2jsonlitelifecyclemagrittrmimeopensslR6rappdirsRcpprlangrprojrootsystriebeardurltoolsvctrswebmockrwhiskerwithryaml

Introduction to vcr

Rendered fromvcr.Rmdusingknitr::rmarkdownon Jul 24 2024.

Last update: 2024-07-19
Started: 2019-06-13

Configure vcr

Rendered fromconfiguration.Rmdusingknitr::rmarkdownon Jul 24 2024.

Last update: 2020-12-04
Started: 2016-04-12

Configure vcr request matching

Rendered fromrequest_matching.Rmdusingknitr::rmarkdownon Jul 24 2024.

Last update: 2020-12-04
Started: 2018-04-04

Debugging your tests that use vcr

Rendered fromdebugging.Rmdusingknitr::rmarkdownon Jul 24 2024.

Last update: 2020-12-04
Started: 2020-11-25

Why and how to edit your vcr cassettes?

Rendered fromcassette-manual-editing.Rmdusingknitr::rmarkdownon Jul 24 2024.

Last update: 2020-12-04
Started: 2020-11-25

Design of vcr

Rendered fromdesign.Rmdusingknitr::rmarkdownon Jul 24 2024.

Last update: 2021-05-04
Started: 2021-05-04

How vcr works, in a lot of details

Rendered frominternals.Rmdusingknitr::rmarkdownon Jul 24 2024.

Last update: 2020-12-04
Started: 2020-11-24

Turning vcr on and off

Rendered fromlightswitch.Rmdusingknitr::rmarkdownon Jul 24 2024.

Last update: 2020-12-15
Started: 2020-12-15

Record modes

Rendered fromrecord-modes.Rmdusingknitr::rmarkdownon Jul 24 2024.

Last update: 2020-12-15
Started: 2020-12-15

Mocking writing to disk

Rendered fromwrite-to-disk.Rmdusingknitr::rmarkdownon Jul 24 2024.

Last update: 2020-12-15
Started: 2020-12-15

Readme and manuals

Help Manual

Help pageTopics
Coerce names, etc. to cassettesas.cassette as.cassettepath
List cassettes, get current cassette, etc.cassettes cassette_path current_cassette
Check cassette namescheck_cassette_names
An HTTP request as prepared by the 'crul' packagecrul_request
Eject a cassetteeject_cassette
Get the http interactions of the current cassettehttp_interactions
HTTPInteraction classHTTPInteraction
HTTPInteractionList classHTTPInteractionList
Insert a cassette to record HTTP requestsinsert_cassette
Turn vcr on and off, check on/off status, and turn off for a given http calllightswitch turned_off turned_on turn_off turn_on
Are real http connections allowed?real_http_connections_allowed
vcr recording optionsrecording
vcr request matchingrequest-matching
RequestHandlerRequestHandler
RequestHandlerCrulRequestHandlerCrul
RequestHandlerHttrRequestHandlerHttr
RequestHandlerHttr2RequestHandlerHttr2
RequestMatcherRegistryRequestMatcherRegistry
Skip tests if vcr is offskip_if_vcr_off
split string every N charactersstr_splitter
UnhandledHTTPRequestErrorUnhandledHTTPRequestError vcr_last_error
Use a cassette to record HTTP requestsuse_cassette
Setup vcr for a packageuse_vcr
Global Configuration Optionsvcr_configuration vcr_configure vcr_configure_reset vcr_config_defaults
Locate file in tests directoryvcr_test_path