📌  相关文章
📜  express 获取查询参数 - Javascript 代码示例

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

代码示例3
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);
});