hi
i would like to know how i can in the Server Handler map a dynamic url. something like this:
url to call it: http://localhost:3000/users/34/books/8989
now i know i can add the * at the end of the handler url and do it like this:
and then call something like this:
and get the values like this:
but my question is can i do it without adding the value keys in the url?
so i want to reach the handler with this URL: http://localhost:3000/users/34/books/8989
and not with this: http://localhost:3000/users?userid=0081&bookid=0021
this is what i found but cannot figure out what i need to do.
stackoverflow.com
thanx, ilan
i would like to know how i can in the Server Handler map a dynamic url. something like this:
B4X:
'app.get('/users/:userId/books/:bookId',function (req,res){
' //...
'})
url to call it: http://localhost:3000/users/34/books/8989
now i know i can add the * at the end of the handler url and do it like this:
B4X:
srvr.AddHandler($"/users/*"$, "books", False)
and then call something like this:
and get the values like this:
B4X:
Sub Handle(req As ServletRequest, resp As ServletResponse)
Log(req.GetParameter("userid"))
Log(req.GetParameter("bookid"))
resp.Write("processing...")
End Sub
but my question is can i do it without adding the value keys in the url?
so i want to reach the handler with this URL: http://localhost:3000/users/34/books/8989
and not with this: http://localhost:3000/users?userid=0081&bookid=0021
this is what i found but cannot figure out what i need to do.

Jetty '{servlet}/{parameter}' url routing
I'm using jetty 9.0.3. How to map an URL such as www.myweb.com/{servlet}/{parameter} to the given servlet and parameter? For example, the URL '/client/12312' will route to clientServlet and its d...
thanx, ilan