registerInterceptor method

void registerInterceptor (String route, Future action(RequestContext req, ResponseContext res))

Registers a middleware action for the given route.

  • route the route to register in this object's REST server (service).
  • action the middleware action to perform at the given route.