expressjs/body-parser — pull request #37 by SPARTAN563 (2014-08-13 18:44:29+00:00)
Title: Allow "waterfall" parsing

### What does this mean?
It is now possible to use multiple instances of this middleware on the same request to extract different types of information. Specifically, it is possible to run the **text** and **json** parsers (or any other combination thereof) on the same request in a non-destructive manner.

### How does this work?
There are a few small (and ideally invisible) changes which have been made to facilitate this, namely caching of the request's body to `req._body_data` and the inclusion of an `into` option when initializing the parsers - letting you specify the property into which the parsed data will be placed (it defaults to `body` to maintain backwards compatibility).

### How is it used?
```js
app.use(bodyParser.json({ into: 'json' });
app.use(bodyParser.text({ into: 'text' });
```

### Why is it necessary?
I'm busy implementing a payment gateway using PayPal, and in the case of their IPN system it is necessary to verify the validity of a request by echoing it to their servers. The request body is in *x-www-form-url-encoded* form and, ideally, I'd like to work with an object representation of that while still having access to the original text for submission to their services.

Obviously this isn't a feature which will be used by everybody, and to be honest I'm not certain it's even necessary for the core library to include this functionality. But at the end of the day the idea of open source projects is for people to contribute their changes, so here's one of mine which may (or may not) come in handy.

### Reasons why I'd think twice about merging it
- Caching of the request's data in its raw form effectively doubles the size of the request in memory, not necessarily nice for a small memory footprint