B4J Question Server & wildcards

Discussion in 'B4J Questions' started by tchart, Jun 23, 2015.

  1. tchart

    tchart Active Member Licensed 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.

    Code:
    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?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    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.
     
Loading...