Registry / testing / dnaeon-go-vcr

dnaeon-go-vcr

JSON →
library1.2.0gogounverified

A Go library for recording and replaying HTTP interactions for testing purposes.

go get github.com/dnaeon/go-vcr
INSTALL
IMPORT
SIG · DNAEON-GO-VCR
D
dnaeon-go-vcr
testinggov1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vcr
github.com/dnaeon/go-vcr

Records an HTTP request to a cassette file and replays it on subsequent runs.

package main import ( "fmt" "net/http" "github.com/dnaeon/go-vcr/recorder" ) func main() { r, err := recorder.New("fixtures/cassette") if err != nil { panic(err) } defer r.Stop() client := &http.Client{Transport: r} resp, err := client.Get("http://example.com") if err != nil { panic(err) } fmt.Println(resp.Status) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
14
Resources
dnaeon-go-vcr — go get dnaeon-go-vcr · libregistry