-
Example:
I am expecting this to match Additionally, I expect path to be populated with This works fine in gin. How to acheive this with Echo? |
Beta Was this translation helpful? Give feedback.
Answered by
aldas
Apr 15, 2021
Replies: 1 comment 1 reply
-
by using e.GET("/api/:namespace/*", func(c echo.Context) error {
namespace := c.Param("namespace")
path := c.Param("*")
fmt.Printf("Request: %s, %s\n", namespace, path)
return c.JSON(http.StatusOK, map[string]string{"status": "ok"})
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
aldas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
by using
*
as last part and getting that value withpath := c.Param("*")