how to print the data from post request on console

前端 未结 6 1011
忘掉有多难
忘掉有多难 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:47

    Use request.query when you have querystring params.

    For form/post data use req.body.

    In your case, use request.body.key.

提交回复
热议问题