我正在使用 golang 的 fasthttprouter 并遵循示例并定义了这样的路由器:
router.GET("/customer/account/detail/:accountId", myHandler.customerAccountDetailHandler)
然后我打电话给我的服务http://locahost:9296/customer/account/detail/2
但是我意识到我不想将参数作为端点的一部分,我宁愿通过像这样调用我的服务来使用普通参数:
http://locahost:9296/customer/account/detail?accountId=2&sort=1
是否可以使用 fasthttprouter 完成?如何?
提前谢谢