📌  相关文章
📜  app.post (req res) 获取数据 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:08.653000             🧑  作者: Mango

代码示例1
const express=require('express');
const app=express();
//accept Post with no midleWare express
app.post("/register/",function(req,res){
    var bodyStr = '';
    req.on("data",function(chunk){
        bodyStr += chunk.toString();
    });
    req.on("end",function(){
        res.send(bodyStr);
    });

});