Closed rgulewich closed 13 years ago
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!
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?