1. This module provides the following parser
(1) JSON body Parser (2) Raw body Parser (3) Text Body Parser (4) url-encoded form Body Parser
2. How to Install
NPM Install Body-parser
3.API
var bodyparser = require (' Body-parser ');
Middleware can be created through the Body-parser object, and when the client requests are accepted, all middleware will add attributes to Req.body, and the request content is empty, parsing to null or error.
(1) Bodyparser.json (options)
Working with JSON data
App.use (Bodyparser.json ());
(2) Bodyparser.raw (options)
Working with buffer data streams
(3) Bodyparser.text (options)
Working with text data
(4) bodyparser.urlencoded (options)
Handling encoded data for UTF-8
App.use (bodyparser.urlencoded ({extented:false}))
Extend ture-> uses the QS Library using the QueryString Library (default) false->.
Body-parser is an HTTP request Body parsing middleware