tchart Well-Known Member Licensed User Longtime User Jun 23, 2015 #1 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. Code: Copy 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?
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. Code: Copy 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?
Erel B4X founder Staff member Licensed User Longtime User Jun 24, 2015 #2 No. It is not possible. I recommend you use POST parameters instead (with a single handler). Otherwise you will encounter difficult to solve encoding issues. Upvote 0
No. It is not possible. I recommend you use POST parameters instead (with a single handler). Otherwise you will encounter difficult to solve encoding issues.