addRoute method

void addRoute(
  1. HttpMethod method,
  2. String path,
  3. HttpRequestHandler handler
)

Add a route handler

Implementation

void addRoute(HttpMethod method, String path, HttpRequestHandler handler) {
  _routes.add(HttpRoute(method: method, path: path, handler: handler));
  _logger.info('Added route: ${method.value} $path');
}