body-parser middleware for nanoexpress
You can use express
body-parser
middleware instead of this middleware
npm i @nanoexpress/middleware-body-parser
# or
yarn add @nanoexpress/middleware-body-parser
See the examples directory
import bodyParser from '@nanoexpress/middleware-body-parser';
app.use(bodyParser());
const bodyParser = require('@nanoexpress/middleware-body-parser/cjs');
app.use(bodyParser());
Options name | Default | Required | Description |
---|---|---|---|
options.json |
true | No | Parse JSON data with content-type of application/json or text/json into JS Object? |
options.urlEncoded |
true | No | Parse JSON data with content-type of x-www-form-urlencoded into JS Object? |
MIT