0
我无法使用Revel检索表单数据。尽管我能够检索查询参数。无法检索Revel的表单参数
我有这样的控制器来测试c.Params
内容:
func (c UserController) SaveUser() revel.Result {
return c.RenderJson(c.Params) //just for check the content
}
当我通过查询参数(密押,值),我得到:
{
"Values": {
"testkey": [
"value"
]
},
"Fixed": null,
"Route": null,
"Query": {
"testkey": [
"value"
]
},
"Form": null,
"Files": null
}
一切OK。但是当我通过一个形式PARAM,我没有得到任何数据:
{
"Values": {},
"Fixed": null,
"Route": null,
"Query": {},
"Form": null,
"Files": null
}
这是一个PUT
请求,我使用邮差传递形式PARAMS。
谢谢。