-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
I'm about to use httprouter in a http api gateway, and use httprouter to match path.
i do not need a handle function, so i register paths with an empty handler:
router := httprouter.New()
router.Handle("GET","/user/:user_id/basic", func(writer http.ResponseWriter,
request *http.Request, params httprouter.Params) {})
router.Handle("GET","/user/:user_id/feature", func(writer http.ResponseWriter,
request *http.Request, params httprouter.Params) {})
then use LookUp method to match path
router.LookUp("GET","/user/1234/basic")
the LookUp method only returns handler, params and tsr currently.
what i need is the matched path /user/:user_id/basic to get the upstream server which is related to the path.
jairogloz, MattKetmo and ajb-neodynamics-io
Metadata
Metadata
Assignees
Labels
No labels