dartvcr library

DartVCR is a library that allows you to record and replay HTTP interactions

Classes

AdvancedOptions
A collection of configuration options that can be used when recording and replaying requests.
Cassette
A class representing a cassette that contains a list of HttpInteractions.
CensorElement
A censor element is a single element to censor from requests and responses.
Censors
A class representing a set of rules to censor elements from requests and responses.
DartVCRClient
A http.BaseClient that records and replays HTTP interactions.
MatchRules
A class representing a set of rules to determine if two requests match.
TimeFrame
A class representing a time frame.
VCR
A VCR can store consistent settings and control a cassette.

Extensions

ExpirationActionExtension
An extension on ExpirationAction that provides additional functionality.

Functions

isJsonList(dynamic content) bool
Returns true if the given content is a JSON list.
isJsonMap(dynamic content) bool
Returns true if the given content is a JSON map.
responseCameFromRecording(Response response) bool
Returns true if the given response came from a recording.

Enums

CommonTimeFrame
The various common TimeFrames available.
ExpirationAction
The various actions that can be taken when an interaction expires.
Mode
The various modes that the VCR can be in.

Typedefs

MatchRule = bool Function(Request received, Request recorded)
A function that determines if two requests match.

Exceptions / Errors

VCRException
An exception throw when an error occurs in the VCR.