CxNetworkCaptureRule constructor

CxNetworkCaptureRule({
  1. String? url,
  2. String? urlPattern,
  3. List<String>? reqHeaders,
  4. List<String>? resHeaders,
  5. bool collectReqPayload = false,
  6. bool collectResPayload = false,
})

Implementation

CxNetworkCaptureRule({
  this.url,
  this.urlPattern,
  this.reqHeaders,
  this.resHeaders,
  this.collectReqPayload = false,
  this.collectResPayload = false,
}) : _compiledPattern = urlPattern != null ? _tryCompile(urlPattern) : null {
  if (url == null && urlPattern == null) {
    throw ArgumentError(
      'CxNetworkCaptureRule: at least one of url or urlPattern must be provided.',
    );
  }
}