on method

  1. @override
void on(
  1. String path,
  2. Middleware middleware, {
  3. HTTPMethod method = HTTPMethod.ALL,
})
inherited

Implementation

@override
void on(
  String path,
  Middleware middleware, {
  HTTPMethod method = HTTPMethod.ALL,
}) {
  if (method == HTTPMethod.ALL) {
    spanner.addMiddleware(path, middleware);
  } else {
    spanner.addRoute(method, path, middleware);
  }
}