Learn R Programming

vcr (version 1.7.0)

Record 'HTTP' Calls to Disk

Description

Record test suite 'HTTP' requests and replays them during future runs. A port of the Ruby gem of the same name (). 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.

Copy Link

Version

Install

install.packages('vcr')

Monthly Downloads

3,907

Version

1.7.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Scott Chamberlain

Last Published

March 10th, 2025

Functions in vcr (1.7.0)

RequestHandler

RequestHandler
Hooks

Hooks class
Persisters

Cassette persisters
Cassette

Cassette handler
HTTPInteraction

HTTPInteraction class
HTTPInteractionList

HTTPInteractionList class
FileSystem

File system persister
RequestHandlerCrul

RequestHandlerCrul
JSON

The JSON serializer
UnhandledHTTPRequestError

UnhandledHTTPRequestError
VcrResponse

The response of an HTTPInteraction
RequestHandlerHttr

RequestHandlerHttr
Serializer

Serializer class - base class for JSON/YAML serializers
RequestIgnorer

Request ignorer
Serializers

Cassette serializers
RequestMatcherRegistry

RequestMatcherRegistry
lightswitch

Turn vcr on and off, check on/off status, and turn off for a given http call
insert_cassette

Insert a cassette to record HTTP requests
request-matching

vcr request matching
RequestHandlerHttr2

RequestHandlerHttr2
recording

vcr recording options
http_interactions

Get the http interactions of the current cassette
real_http_connections_allowed

Are real http connections allowed?
cassettes

List cassettes, get current cassette, etc.
YAML

The YAML serializer
as.cassette

Coerce names, etc. to cassettes
eject_cassette

Eject a cassette
crul_request

An HTTP request as prepared by the crul package
str_splitter

split string every N characters
check_cassette_names

Check cassette names
request_response

request and response summary methods
use_cassette

Use a cassette to record HTTP requests
use_vcr

Setup vcr for a package
skip_if_vcr_off

Skip tests if vcr is off
vcr-package

vcr: Record 'HTTP' Calls to Disk
vcr_test_path

Locate file in tests directory
vcr_configure

Global Configuration Options
vcr_logging

vcr log file setup
Request

The request of an HTTPInteraction