how to print the data from post request on console

前端 未结 6 1026
忘掉有多难
忘掉有多难 2021-02-18 16:07

I am trying to print the post data on my console


app.js

var express = require(\'express\')
 , http = require(\'http\');

var app         


        
6条回答
  •  渐次进展
    2021-02-18 16:59

    You can't call app.use(express.bodyParser()); inside middleware/route handler:

    • request should pass through bodyParser() before it reaches route handler
    • you will be adding new bodyParser()s in each request, but they will be after app.router and will never work

提交回复
热议问题