wiremock-rs icon indicating copy to clipboard operation
wiremock-rs copied to clipboard

Panic if the `path` matcher receives as input a URL with a host

Open LukeMathWalker opened this issue 3 years ago • 1 comments

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.

LukeMathWalker avatar Jan 03 '23 20:01 LukeMathWalker

shouldn't this be closed? #108 has been merged

ilasorsa avatar Oct 23 '24 21:10 ilasorsa