mcavage/node-restify — pull request #318 by geebee (2013-02-10 18:19:02+00:00)
Title: Allow use of 'requestBodyOnGet' option in bodyParser

Please feel free to ignore this request should the change be deemed not useful.

I have run across several situations where I believe that `GET` is the appropriate HTTP verb to service a route, but I would like to pass in information that is contextually relevant to the request. For several reasons (mostly because I prefer JSON objects as a means of passing options to my API, and because I find the URL length limit to be cumbersome), I have found that it is useful in these circumstances to allow a request body sent in a `GET` request to be parsed.

This patch simply allows the use of the option `requestBodyOnGet` in the options object that is passed to the bodyParser plugin. If set to `true`, the request body will be parsed normally (like a standard `POST`, `PUT`, etc.). The mapParams option is completely unmodified, and is respected as normal.

Technically, a request body in a `GET` request does not violate the specification (although I will certainly concede it is generally accepted to be an 'odd case').

I feel that the change is both safe enough, useful enough, and well enough in line with the rest of the project that it merits inclusion.

Either way, thank you for taking the time to consider the request.
Mike