ftybr-add-to-req
v0.0.2
Published
Add data to request
Downloads
3
Readme
ftybr-add-to-req
To create your middleware object:
var addToReq = require('ftybr-add-to-req');
Once you've instantiated it, you may add this middleware to your ftybr router:
router.registerMiddleware(addToReq('someData', ['win']));
This middleware will create a req.data object containing the parsed data from any GET query string, POST form data and or POST JSON data. The POST data will overwrite any GET data.