Forms
获取请求中的Query参数可以有多种方式:
- 通过ctx的Forms()获取
ctx.Forms().Get()
- 通过ctx.Form系列方法获取
ctx.Form("get") // 返回string
ctx.FormInt("get", 1) // 返回int,如果不存在或者为0,则返回1
...
...
- 通过ctx.Req()返回的*http.Request获取
ctx.Req().FormValue("get") // 返回string
获取请求中的Query参数可以有多种方式:
ctx.Forms().Get()
ctx.Form("get") // 返回string
ctx.FormInt("get", 1) // 返回int,如果不存在或者为0,则返回1
...
...
ctx.Req().FormValue("get") // 返回string
Deleting the wiki page 'ZH_Forms' cannot be undone. Continue?