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

path variable in url not support? #358

Open
liudonghua123 opened this issue Jun 1, 2019 · 2 comments
Open

path variable in url not support? #358

liudonghua123 opened this issue Jun 1, 2019 · 2 comments

Comments

@liudonghua123
Copy link

I need to write a mock something like this. the id part of url is variable.

Mock.mock(/\/api\/record\/:id/, 'get', patientQuery)

So how can i get this to work. From the documentation https://github.com/nuysoft/Mock/wiki/Mock.mock(), I could not find any tips.

@tower1229
Copy link

同问,url不支持通配符吗

@elevenkey
Copy link

Mock.mock(//api/record/\d+/, 'get', patientQuery)

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

No branches or pull requests

3 participants