npm.io
0.0.1 • Published 11 years ago

text-body

Licence
WTFPL
Version
0.0.1
Deps
1
Vulns
0
Weekly
0

text-body

Takes a text/plain request body and puts it on the req.body property.

Install

npm install text-body

Example

var textbody = require('text-body')({ // Options
    limit: 512 // Optional limit - Limit body size
});

// or use it as you would any middlware
app.post('/example/page', textbody, function(req, res) {
    // req.body is either the body content or an empty string ('')
    res.send('Hello ' + req.body);
});

Keywords