gin 路径返回显示

假如请的URL是 /info/hello?key=name
"url": ctx.Request.URL.    显示一个对象
"uri": ctx.Request.RequestURI,  显示是的全路径    /info/hello?key=name
"path": ctx.Request.URL.Path, 显示的是没有query 的路径 /info/hello
"route": ctx.FullPath(),   显示的是路由路径  /info/:pathname
posted @ 2023-03-12 19:07  火鸟网络  阅读(17)  评论(0编辑  收藏  举报