-
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
data element not passed in request body with assert.response #71
Comments
I think the problem may be that Content-Type and Content-Length headers are not being sent from issue() in the expresso executable. I was able to monkey patch it to work for POST requests by setting those values. Something like:
If it weren't so late I'd fork this right now. |
I am having the same issue, no data is transmitted to server |
I path'ed from what @adrianbravo has suggested, but I did not submit the path, since I got to admit, I don't really understand the headers I've set! xD From line
|
Also ran into this problem. req.headers in issue() was undefined but needs to include req.headers['Content-Type'] = 'application/x-www-form-urlencoded'; on form submitted (non-get) requests. Correct me if I'm wrong but Content-Length is not necessary due to using chunked encoding by default. Would be helpful to update the examples on the homepage to make this clear.
|
Hey, my solution to this was switching to Vows and Request, even wrote a post about it, hope it helps: http://fabianosoriani.wordpress.com/2011/08/31/testing-a-node-js-express-api-server-with-vows-functional/ |
This resolves the issue where a data element is not passed in request body with assert.response.
I'm trying to use assert.response to test a PUT method, but the data part doesn't get passed.
The express part works with
Here's the code to illustrate the problem - using node v0.4.0 and npm tells me these are the other versions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
lib versions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
The text was updated successfully, but these errors were encountered: