eddycjy / go-gin-example

An example of gin
MIT License
6.84k stars 1.59k forks source link

修复GetArticles的获取参数方式,改为Query #133

Closed nullsimon closed 1 year ago

nullsimon commented 2 years ago

GetArticles 在router里面定义的是Get方法

apiv1.GET("/articles", v1.GetArticles)

所以应该使用c.Query("state"), 而不是 c.PostForm("state")