Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node.js express post query string

const express = require('express');
const bodyParser = require('body-parser');

const app = express();
app.use(bodyParser.urlencoded({ extended: true }));

// POST /somepost/?name=somename
app.post('/somepost', (req, res) => {
    console.log('Name:', req.query.name);
    res.status(200);
});
 
PREVIOUS NEXT
Tagged: #express #post #query #string
ADD COMMENT
Topic
Name
4+4 =