Skip to content

Advanced filters

Compare
Choose a tag to compare
@seborama seborama released this 24 Oct 23:24
· 100 commits to master since this release

This release replaces ExcludeHeaderFunc and FilterFunc's with RequestFilters and ResponseFilters.

Filters are much more flexible and simpler to use. They also offer the possibility to more easily re-use Filters and create re-usable "recipes" of Filters.

Many thanks to @klauspost for his great work!

Here's a simple example:

govcr.VCRConfig{
	RequestFilters: govcr.RequestFilters{
		govcr.RequestDeleteHeaderKeys("X-Custom-My-Date"),
	},
}

Refer to examples/example6.go for advanced examples.