matches method

bool matches(
  1. String method,
  2. String path,
  3. Map<String, dynamic>? queryParameters,
  4. dynamic requestData,
)

检查是否匹配

Implementation

bool matches(
  String method,
  String path,
  Map<String, dynamic>? queryParameters,
  dynamic requestData,
) {
  // 基本匹配:方法和路径
  if (this.method != method || this.path != path) {
    return false;
  }

  // 自定义匹配器
  if (matcher != null) {
    return matcher!(method, path, queryParameters, requestData);
  }

  return true;
}