wiremock-rs
wiremock-rs copied to clipboard
Panic if the `path` matcher receives as input a URL with a host
I have bumped into users trying the following:
Mock::given(path("https://domain.com/abcd"));
with an expectation that it will match incoming requests for /abcd.
In reality, they should write:
Mock::given(path("/abcd"));
to achieve the desired outcome.
path should panic if the input contains a host, with an helpful suggestion pointing at the right usage pattern.
shouldn't this be closed? #108 has been merged