Allowing PUT / POST without request body data #13

Merged
1 commit merged into from Feb 6, 2011

Conversation

Projects
None yet
2 participants
Contributor

rgulewich commented Feb 6, 2011

I often find myself doing a PUT or a POST only specifying options - not specifying request body data at all. This patch will only read from stdin if it's a pipe.

This does break the ability to just type in data when doing a POST, so maybe you're not okay with that. If that's the case, this this could maybe be an option to PUT or POST?

Owner

micha commented Feb 6, 2011

Hmm. I like it. The existing behavior isn't very convenient if you're POSTing with null data a lot. And I don't think your changes will be a big deal for people. After all, if you want to just type the data in when doing a POST you can always do something like

cat | POST /Test

which is fine as far as I'm concerned. I think I'll merge you in and if anyone complains we can rethink how to fix it. Thanks!

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment