Answers for "app.post (req res) get data"

1

app.post (req res) get data

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);
    });

});
Posted by: Guest on September-16-2020

Code answers related to "app.post (req res) get data"

Code answers related to "Javascript"

Browse Popular Code Answers by Language