草庐IT

fasthttprouter

全部标签

http - 在 fasthttprouter 中将参数定义为端点 url 的参数请求 instad

我正在使用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可以用fast