0.0.2 • Published 9 years ago

raw-body-parser v0.0.2

Weekly downloads
28
License
MIT
Repository
github
Last release
9 years ago

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