match method

bool match(
  1. String method,
  2. String path
)

Implementation

bool match(String method, String path) {
  final regExp = pathToRegExp(this.path);
  final methodMatch = method.toUpperCase() == 'ALL'
      ? true
      : this.method.toUpperCase() == method.toUpperCase();
  return methodMatch && regExp.hasMatch(path);
}