Skip to content

Allow wildcards for query string parameters#81

Open
KyleW wants to merge 4 commits intonamshi:masterfrom
KyleW:master
Open

Allow wildcards for query string parameters#81
KyleW wants to merge 4 commits intonamshi:masterfrom
KyleW:master

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