copyWith method
Creates a copy of this strategy with the given parameters
Implementation
ScrapingStrategy copyWith({
int? retries,
int? timeout,
Map<String, String>? headers,
int? initialBackoff,
double? backoffMultiplier,
int? maxBackoff,
bool? useRandomUserAgent,
bool? rotateProxiesOnRetry,
bool? validateProxies,
}) {
return ScrapingStrategy(
retries: retries ?? this.retries,
timeout: timeout ?? this.timeout,
headers: headers ?? Map.from(this.headers),
initialBackoff: initialBackoff ?? this.initialBackoff,
backoffMultiplier: backoffMultiplier ?? this.backoffMultiplier,
maxBackoff: maxBackoff ?? this.maxBackoff,
useRandomUserAgent: useRandomUserAgent ?? this.useRandomUserAgent,
rotateProxiesOnRetry: rotateProxiesOnRetry ?? this.rotateProxiesOnRetry,
validateProxies: validateProxies ?? this.validateProxies,
);
}