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

update modify request body eg #712

Merged
merged 3 commits into from
Oct 9, 2014
Merged

update modify request body eg #712

merged 3 commits into from
Oct 9, 2014

Conversation

suzukua
Copy link
Contributor

@suzukua suzukua commented Oct 9, 2014

No description provided.

@indexzero
Copy link
Contributor

👍 thank you for your contribution @zhudan. What are your thoughts @jcrugzz? You've been looking this over most recently.

@jcrugzz
Copy link
Contributor

jcrugzz commented Oct 9, 2014

@zhudan LGTM. My only question is why the custom re-streamer rather than using connect-restreamer. Just curious as it is the same logic.

@suzukua
Copy link
Contributor Author

suzukua commented Oct 9, 2014

@jcrugzz yes, same logic, but just for json body. his code has bug, https://github.com/dominictarr/connect-restreamer/blob/master/index.js#L15 should be: req.emit('data', req[options.property]).
when the body is xml, it can not use JSON.stringify(req.body), because it will be escaped, then the content-length (#704 (comment))

Forgive my bad English .

@jcrugzz
Copy link
Contributor

jcrugzz commented Oct 9, 2014

@zhudan gotcha, it looks like you would have to pass it a no-op stringify function for that particular case.

jcrugzz added a commit that referenced this pull request Oct 9, 2014
update modify request body eg
@jcrugzz jcrugzz merged commit 3768cce into http-party:master Oct 9, 2014
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

Successfully merging this pull request may close these issues.

3 participants