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

Allow wildcards for query string parameters #81

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

KyleW
Copy link

@KyleW KyleW commented Nov 8, 2019

Addresses #67 . Allow __ in file names in place of a query param. For example: GET--foo=bar&buz=__.mock matches GET /?foo=bar&buz=baz

Other changes in this PR:

  • fixes a bug with handling post bodies and query params in the same request
  • makes query params in file names order agnostic

Comment on lines +250 to +253
if (body && query) {
return '_'+ body + '--' + query;
}

Copy link
Author

@KyleW KyleW Nov 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd appreciate another set of eyes on this.

This is the behavior described in the docs, but I don't think it was actually implemented before now. I added what I think is the right implementation, but I don't want to inadvertently introduce a breaking change.

If it's in doubt, I'm glad to remove it since it's not directly tied to the core purpose of the pr.

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

Successfully merging this pull request may close these issues.

1 participant