copyWith method
Implementation
DfHttpClientConfig copyWith({
String? baseApiUrl,
Encoding? encoding,
Map<String, String>? headers,
int? timeout,
bool? retryApiCall,
bool? waitForTokenRefresh,
int? maxRetryAttempts,
Future<Result<String, Exception>> Function()? refreshToken,
}) {
return DfHttpClientConfig(
baseApiUrl: baseApiUrl ?? this.baseApiUrl,
encoding: encoding ?? this.encoding,
headers: headers ?? {...this.headers},
maxRetryAttempts: maxRetryAttempts ?? this.maxRetryAttempts,
refreshToken: refreshToken ?? this.refreshToken,
retryApiCall: retryApiCall ?? this.retryApiCall,
timeout: timeout ?? this.timeout,
waitForTokenRefresh: waitForTokenRefresh ?? this.waitForTokenRefresh,
);
}