text-body

0.0.1 • Public • Published

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);
});

Package Sidebar

Install

npm i text-body

Weekly Downloads

1

Version

0.0.1

License

WTFPL

Last publish

Collaborators

  • download