Provides a middlware handler which parses Content-Type: application/x-www-form-urlencoded
bodies into an object on req.body
.
npm install sw-body-url
var http = require('http');
var sw = require('simpleware');
var bodyurl = require('sw-body-url')({
maxLength: 8192 // The maximum length of the body
});
app.post('/posttopath', bodyurl, function(req, res) {
res.end(req.body.say);
});