Closed mahabubx7 closed 26 minutes ago
HTTP Call
POST /api/v1/post/a/:a/b/:b/c/:c/d/:d/e/:e/f/:f/g/:g/h/:h/i/:i/j/:j/k/:k/l/:l/m/:m/n/:n/o/:o/p/:p/q/:q/r/:r/s/:s/t/:t/u/:u/v/:v/w/:w/x/:x/y/:y/z/:z HTTP/1.1
Response
{
"params": {
"a": ":a",
"b": ":b",
"c": ":c",
"d": ":d",
"e": ":e",
"f": ":f",
"g": ":g",
"h": ":h",
"i": ":i",
"j": ":j",
"k": ":k",
"l": ":l",
"m": ":m",
"n": ":n",
"o": ":o",
"p": ":p",
"q": ":q",
"r": ":r",
"s": ":s",
"t": ":t",
"u": ":u",
"v": ":v",
"w": ":w",
"x": ":x",
"y": ":y",
"z": ":z"
}
}
[BUG] Gateway (Route) cannot parse extreme depth or multi-level route with params.
Just discovered this today, if I define an endpoint like
/api/v1/user/:id/profile/:change/password
or/a/:a/b/:b/c/:c/d/:d/e/:e....
something like this. It will not return response as expected. It gives us 404.Solution => Just read some frameworks like
Hono
,Adonis.js
to find how they manage their router. Then, I found something and going to implement.