Closed sergiught closed 2 years ago
@sergiught , please check #81 and let me know what do you think?
Example hook you could set looks like this.
hook := func(i *cassette.Interaction) error {
if i.Request.Method == http.MethodPost && i.Request.Body == "foo" {
i.DiscardOnSave = true
}
return nil
}
Describe the problem you'd like to have solved
I'd like to have a way to specify which kind of
Interaction
to skip from being recorded on disk inside a cassette. This would be useful for example if I don't want the cassette spammed with 429s.Describe the ideal solution
Perhaps something like:
Alternatives and current workarounds
Current workaround would be to manually remove them from the cassette file.
Additional context
Thanks a lot for maintaining this! It's a great project. 👍🏻