copyWith method
Returns a copy with selected fields replaced.
Implementation
ProxyConfig copyWith({
String? targetUrl,
String? proxyUrl,
Map<String, String>? headers,
Duration? timeout,
int? retries,
bool? cacheEnabled,
String? cacheDir,
Duration? cacheTtl,
}) {
return ProxyConfig(
targetUrl: targetUrl ?? this.targetUrl,
proxyUrl: proxyUrl ?? this.proxyUrl,
headers: headers ?? this.headers,
timeout: timeout ?? this.timeout,
retries: retries ?? this.retries,
cacheEnabled: cacheEnabled ?? this.cacheEnabled,
cacheDir: cacheDir ?? this.cacheDir,
cacheTtl: cacheTtl ?? this.cacheTtl,
);
}