Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

express req get json

const express = require('express');
const app = express();

app.use(express.json());

app.post('*', (req, res) => {
  req.body;	// The json object sent to the server
});
const port = 3000;
app.listen(port, () => console.log(`Listening on port ${port}.`));
 
PREVIOUS NEXT
Tagged: #express #req #json
ADD COMMENT
Topic
Name
1+2 =