Am 16.09.2013 15:13, schrieb Dicebot:

On Sat, 14 Sep 2013 18:47:39 +0200, Sönke Ludwig wrote:

The vibe.http.form module is supposed to be extended in that direction
(basically it shall get the same UDA support that vibe.http.rest
already has). Once this is finished, it would mean that the use case you
outlined is possible + support for automatic form to parameter
conversion. The interface also needs to be extended a bit for non-member
functions and a few other things, too.

It is actually quite an interesting option to move those UDA's to router module itself and make generic.

So that this overload will be added:

router.add!handler(default_method, default_url)

Wich will check handler symbol for http method and url UDA's and register matching route. It can then be used as generic interface in all modules, including the OP proposal.

Good idea, it should be orthogonal to all the parameter/JSON/form
handling. I would rather implement it as a UFCS function, though, to
keep URLRouter itself simple.