MERN Quick Start Guide
上QQ阅读APP看书,第一时间看更新

How it works...

Terminal outputs something like:

{ 'urlencoded': 'Example' } 
txtencoded=Example 

Two parsers are used above:

  1. The first one bodyParser.urlencoded() parses incoming requests for multipart/form-data encoding type. The result is available as an Object in request.body
  2. The second one bodyParser.text() parses incoming requests for text/plain encoding type. The result is available as a String in request.body