Am 25.03.2015 um 21:22 schrieb Marc Schütz:

Is it possible to attach a @before or @after handler to all exposed
methods of a router interface? Better yet, even including all sub
routers?

Such a handler would need to be a template so it can fit all method
signatures.

Not directly possible currently. The question is if this would better be
a feature supported by the interface generator, or maybe a general
transformation feature that takes a class as input an outputs a class
that has all function calls properly augmented (with attributes or
directly with code). Could be something for std.functional.

At least for certain use cases, just intercepting the HTTP request and
possibly storing some values in req.params can be a viable alternative
(or, similarly, intercepting the response in case of a
RestInterfaceClient).