Learn R Programming

vcr (version 1.6.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,015

Version

1.6.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

July 23rd, 2024

Functions in vcr (1.6.0)

Hooks

Hooks class
Cassette

Cassette handler
FileSystem

File system persister
JSON

The JSON serializer
RequestHandler

RequestHandler
HTTPInteraction

HTTPInteraction class
HTTPInteractionList

HTTPInteractionList class
RequestHandlerCrul

RequestHandlerCrul
Request

The request of an HTTPInteraction
Persisters

Cassette persisters
as.cassette

Coerce names, etc. to cassettes
RequestMatcherRegistry

RequestMatcherRegistry
Serializers

Cassette serializers
RequestHandlerHttr

RequestHandlerHttr
UnhandledHTTPRequestError

UnhandledHTTPRequestError
YAML

The YAML serializer
VcrResponse

The response of an HTTPInteraction
RequestIgnorer

Request ignorer
Serializer

Serializer class - base class for JSON/YAML serializers
RequestHandlerHttr2

RequestHandlerHttr2
http_interactions

Get the http interactions of the current cassette
real_http_connections_allowed

Are real http connections allowed?
request-matching

vcr request matching
check_cassette_names

Check cassette names
insert_cassette

Insert a cassette to record HTTP requests
recording

vcr recording options
cassettes

List cassettes, get current cassette, etc.
eject_cassette

Eject a cassette
crul_request

An HTTP request as prepared by the crul package
lightswitch

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

Locate file in tests directory
request_response

request and response summary methods
str_splitter

split string every N characters
skip_if_vcr_off

Skip tests if vcr is off
vcr_configure

Global Configuration Options
use_cassette

Use a cassette to record HTTP requests
vcr_logging

vcr log file setup
use_vcr

Setup vcr for a package
vcr-package

vcr: Record 'HTTP' Calls to Disk