Releases: seborama/govcr
Bug fix: correctly persist cassette path
Thanks Alexandre for his PR!
Introduced support for binary body
Thanks to Richard for his PR.
Update to README
v2.1.0 Update README.md
Streamlined FilterFuncs
This release changes the API and hence is tagged as v2.
It removes the v1 style FilterFuncs and consolidates them in two new FilterFuncs: RequestFilterFunc
and ResponseFilterFunc
.
RequestFilterFunc
receives the request Header / Body to allow their transformation. Both the live request and the replayed request are filtered at comparison time. Transformations are not persisted and only for the purpose of influencing comparison.
ResponseFilterFunc
is the flip side of RequestFilterFunc
. It receives the response Header / Body to allow their transformation. Unlike RequestFilterFunc
, this influences the response returned from the request to the client. The request header is also passed to ResponseFilterFunc
but read-only and solely for the purpose of extracting request data for situations where it is needed to transform the Response.
Fixes and improvements
Patch a silly bug with the default ExcludeHeaderFunc
.
Some improvements.
Added support for custom cassettte location
Via VCRConfig.CassettePath
Quick example:
vcr := govcr.NewVCR("MyCassette",
&govcr.VCRConfig{
CassettePath: "./govcr-fixtures",
})
Note:
If you omit CassettePath
or use ""
then the default path is ./govcr-fixtures
.
First stable fully functional release
This is the first stable release.
All functionality is implemented as per documentation.