B4J Question Server & wildcards

tchart

Well-Known Member
Licensed User
Longtime User
I'm trying to write a generic handler where the URI may will contain a SQL table name and have generic methods after the table name in the URI.

For example I would use a one handler for;

/admin/Table1/Create
/admin/Table2/Create
/admin/Table3/Create
etc

I've tried using a wildcard as per the code below but this doesn't work.

B4X:
srvr.AddHandler("/admin/*/Create*", "TableCreate", True)
srvr.AddHandler("/admin/*/Update*", "TableUpdate", True)
srvr.AddHandler("/admin/*/Delete*", "TableDelete", True)

Is it possible to use wildcards in the middle of the URL pattern?

Or should I be using a filter?
 
Top