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

Wildcard matching #385

Closed
sindresorhus opened this issue Oct 22, 2015 · 3 comments
Closed

Wildcard matching #385

sindresorhus opened this issue Oct 22, 2015 · 3 comments

Comments

@sindresorhus
Copy link

It would be useful if it was possible to do wildcard matching. Sometimes I just want to match any path on a domain and reply back with some data.

The following would match any path, like http://website.com/foo/bar.

nock('http://website.com').get('*').reply(200, {foo: true});
@pgte
Copy link
Member

pgte commented Oct 22, 2015

I'd prefer we go with a function or a regular expression rather than a string.

@pgte
Copy link
Member

pgte commented Oct 22, 2015

Duplicate of #347

@pgte pgte closed this as completed Oct 22, 2015
@lock
Copy link

lock bot commented Sep 13, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you!

@lock lock bot locked as resolved and limited conversation to collaborators Sep 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants