Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LukeMathWalker opened this issue Jan 3, 2023 · 0 comments
Open
Labels
good first issue Good for newcomers

Comments

@LukeMathWalker
Copy link
Owner

LukeMathWalker commented Jan 3, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant