http://127.0.0.1:8080/x?haha=1
我想买点像ctx.QueryArgs().Get("haha")这样的东西
在戈朗的fasthttp包里有可能吗?
发布于 2016-09-01 09:36:49
找到了
ctx.QueryArgs().Peek("haha")命名选择是出乎意料的。
发布于 2020-04-06 08:23:02
使用Peek和PeekMulti
?haha=1
ctx.QueryArgs().Peek("haha")
?haha=1&haha=2
ctx.QueryArgs().PeekMulti("haha")这里声明了一些有用的方法:https://github.com/valyala/fasthttp/blob/a1cfe58ca86648c6701f1cb7e8b1587348dd5b9f/args.go#L245
发布于 2019-08-31 17:21:29
您可以使用方法检索自定义的PUT GET、POST PUT参数:
字面上,从文件中看:
FormValue返回与给定键关联的表单值。
该值在以下位置进行搜索:
有更多细粒度的方法来获取表单值:
token = string(ctx.FormValue("token"))文档:https://godoc.org/github.com/valyala/fasthttp#RequestCtx.FormValue
https://stackoverflow.com/questions/39265978
复制相似问题