mcavage/node-restify — Issue #61: Make bodyParser merging into req.params optional
Author: DamonOehlman
Created: 2012-01-31 06:23:27+00:00
State: open

Hey Mark,

Great work with restify - we are moving a lot of our current API centric apps across to using restify from express. One thing I'd love some flexibility on is the ability to have the req.body contain the JSON parsed object rather than automatically mapping those values across to the req.params object.

I'm not sure what the default behaviour should be, but it is something that tripped me up on the move over from Express. Perhaps if the body parser initialisation accepted some options for initialization that allowed you to specify whether you wanted parameter mapping on or off, e.g.

```js
server.use(restify.jsonBodyParser({ mapParams: true }));
```

Thanks,
Damon.