registerInterceptor method

void registerInterceptor (
  1. String route,
  2. Future action(
    1. RequestContext req,
    2. 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.