Answers for "express body-paraser"

4

body parser

<script>
const bodyParser = require("body-parser");

app.use(bodyParser.urlencoded({extended:true}));
  
app.post("/", function(req, res){
  let firstName = req.body.fNAME;
  
});
</script>

<input type="text" name="fNAME" placeholder="First Name">
Posted by: Guest on July-08-2020
-1

app use body parser

// parse application/json
app.use(bodyParser.json())
Posted by: Guest on July-26-2020

Browse Popular Code Answers by Language