LukeMathWalker / wiremock-rs

HTTP mocking to test Rust applications.
Apache License 2.0
637 stars 73 forks source link

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

Open LukeMathWalker opened 1 year ago

LukeMathWalker commented 1 year ago

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.

ilasorsa commented 2 weeks ago

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