add: 模仿gin框架
This commit is contained in:
@@ -13,9 +13,13 @@ func main() {
|
||||
c.String(200, "hello,%v", c.Query("name"))
|
||||
})
|
||||
engine.POST("/login", func(c *gee.Context) {
|
||||
//c.JSON(200, gee.H{
|
||||
// "username": "xxxx",
|
||||
// "password": "1234",
|
||||
//})
|
||||
c.JSON(200, gee.H{
|
||||
"username": "xxxx",
|
||||
"password": "1234",
|
||||
"username": c.PostForm("username"),
|
||||
"password": c.PostForm("password"),
|
||||
})
|
||||
})
|
||||
_ = engine.Run(":9000")
|
||||
|
||||
Reference in New Issue
Block a user