zweizhao.github.io

项目,文章,随笔,博客,Markdown,个人网站,人生感悟。

View on GitHub

GET

req.query

POST

const app = require("express”)()
const bodyParser = require("body-parser")

// need it...  
app.use(bodyParser.urlencoded({ extended: false }))

app.post('/login',function(req,res) {  
    var user_name = req.body.user
    var password = req.body.password
    console.log("User name  =  "+user_name+", password is " + password)
    res.end("yes")
})