With the current code, in the org.jpublish.module.restpathactions.RestPathActionModel, as you can see, there is a "methods" property, and the plan was to allow the user to configure a route like this:
<routes>
...
<route path="demo/foo" method="GET|POST" action="rest/SomeAction.bsh">
...
If you define a route like the example above, the "method" config attribute will be loaded by the RestPathActionsModule and made available to the matcher, eventually will be interpreted around the line 71 in the RestPathAction, as you very well noticed, see next fragment.
If this workaround is acceptable, then I'll finalize the implementation by simply replacing lines 70-72 with something like this:
// todo: add uppercase or lowercase safe comparison ...
boolean methodMatchesToo = rm.getMethods() != null && rm.getMethods().contains(method);
if (matcher.matches(path) && methodMatchesToo) { ... // GET by default if methods === null
That will do it. What do you think?
V/r
-florin
> --
> You received this message because you are subscribed to the Google Groups "JPublish User Group" group.
> To post to this group, send email to jpubli...@googlegroups.com.
> To unsubscribe from this group, send email to jpublish-use...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jpublish-user?hl=en.
>
V/r
-florin