General HTTP request body parser
npm install get-body



> General HTTP request body parser.
Looking for a multipart body parser? Try busboy.
```
npm install get-body --save
`ts
import { parse, json, text, form } from 'get-body'
import { createServer } from 'http'
createServer(function (req) {
parse(req, req.headers).then(body => console.log(body))
})
`
1. stream: Readable An instance of the request streamheaders: object
2. The raw headers object as a lower-cased mapoptions: object
3. Parser configuration
* limit Controls the maximum request body size (default: 100kb).decoders
* Map of known content-encoding decoders (default: exports.decoders)jsonParse
* Custom behaviour for JSON parsing (default: strict JSON.parse check)formParse
* Custom behaviour for form parsing (default: querystring.parse)jsonTypes
* Array of media types to parse as JSONformTypes
* Array of media types to parse as a formtextTypes` Array of media types to parse as text
*
This project is written using TypeScript and publishes the definitions directly to NPM.
Apache 2.0