This changeset adds the ability to specify any function (or set of functions)
that provide custom matching behaviour by using a new custom_matchers option.
As demonstrated in the example provided in the README.md and tests, this should allow to resolve issues like #134 where more specific matching logic is for whatever reason required.
This also opens the possibility of a bigger refactor, where even the "default" matchers (url, method, headers, body etc) are simply functions that are applied in the same way, and users can decide which ones to use or not (removing the need for the match_requests_on option).
Coverage increased (+0.06%) to 92.986% when pulling 2a076ff5cc6011aafffce6f1f69e02e40f9f2bc6 on Geekfish:enhance/custom-matchers into ebb0b5a19ad78b240bf59fc860aaa600b65d9224 on parroty:master.
Hello!
This changeset adds the ability to specify any function (or set of functions) that provide custom matching behaviour by using a new
custom_matchers
option.As demonstrated in the example provided in the README.md and tests, this should allow to resolve issues like #134 where more specific matching logic is for whatever reason required.
This also opens the possibility of a bigger refactor, where even the "default" matchers (url, method, headers, body etc) are simply functions that are applied in the same way, and users can decide which ones to use or not (removing the need for the
match_requests_on
option).