-
Notifications
You must be signed in to change notification settings - Fork 89
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
JSON payloads #38
Comments
This would add a bit of complexity, but looking at the code base I could imagine the following would be possible to enable this use case. I believe this would benefit Linux/Mac as well since the file names for this scenario could be pretty unwieldy and plus the json could be re-used for something else (e.g. a test). Use a new special character -- '@' after the method which is legal within a file name for all file systems as far as I know. The part between the '@' and 'mock' within the same directory would be the a JSON file with the payload.
Contents of payload.json {
"data": {
"index" : 0,
"max": 25
},
"sortBy": ["name"]
} Would be willing to take a stab as this library is pretty cool and potentially quite useful, but at the same time this is gap is a real limitation. |
@joshmorel feel free to have a crack at it! :) |
@artsyca let us know if this works on win (can't test it at the moment) -- if so, we should merge it :) Cheers! |
I'm trying it on Windows, and it doesn't work. That's correct ? I need to do that on linux ? I want to use the external file. |
Hello, can I have some info on this issue. Is this going to be supported ? I saw that the pull request of @joshmorel (#44) was not merged and the whole item closed for inactivity. Is the plan to adapt his work as a new pull request ? Or is there another way of implementing this ? |
Hi @birdmod no plans yet, but we'd be happy to review any PR that comes this way 😄 |
When posting JSON in the body, the filename matcher attempts to match the entire body of the payload as the filename.
This has some repercussions on windows as many characters are invalid:
I wonder if there are any alternative ways to match responses to requests?
The text was updated successfully, but these errors were encountered: