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

hock.post() requires body, but docs say otherwise #30

Open
nene opened this issue Dec 29, 2016 · 0 comments
Open

hock.post() requires body, but docs say otherwise #30

nene opened this issue Dec 29, 2016 · 0 comments

Comments

@nene
Copy link

nene commented Dec 29, 2016

I was trying to write a test where a POST request to some URL returns some data, but I didn't care what the actually posted data is. Took me a while to figure out why I can't achieve this with Hock.

The docs in code say that body parameter is optional:

https://github.com/mmalecki/hock/blob/master/lib/hock.js#L186

But according to my testing it's not. Also found from code that body must match exactly:

https://github.com/mmalecki/hock/blob/master/lib/request.js#L213

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

1 participant