npm.io
0.0.2 • Published 11 years ago

raw-body-parser

Licence
MIT
Version
0.0.2
Deps
0
Vulns
0
Weekly
0
Stars
1

raw-body-parser

A lightweight middleware to retrieve raw body (only) from Node js Request as a Buffer. This API is intended to be used without body-parser, json, and urlencoded.

Installation

On your project folder:

$ npm install raw-body-parser

Usage

In server.js:

var rawBodyParser = require('raw-body-parser');

app.use(rawBodyParser());

In route.js:

var rawBody = req.rawBody.toString('utf8');

License

MIT

Keywords