copyWith method
ApiRequestOptions
copyWith({
- Map<
String, String> ? headers, - Map<
String, String> ? cookies, - bool? noAuth,
- bool? retry,
- bool clearRetry = false,
- bool? retryUnsafeRequest,
- String? idempotencyKey,
- CancelToken? cancelToken,
- String? operationId,
- ApiCallLogOptions? log,
- bool clearLog = false,
- List<
String> ? invalidateCacheTags, - List<
String> ? invalidateCachePaths, - bool? clearActiveSessionCache,
Implementation
ApiRequestOptions copyWith({
Map<String, String>? headers,
Map<String, String>? cookies,
bool? noAuth,
bool? retry,
bool clearRetry = false,
bool? retryUnsafeRequest,
String? idempotencyKey,
CancelToken? cancelToken,
String? operationId,
ApiCallLogOptions? log,
bool clearLog = false,
List<String>? invalidateCacheTags,
List<String>? invalidateCachePaths,
bool? clearActiveSessionCache,
}) =>
ApiRequestOptions(
headers: headers ?? this.headers,
cookies: cookies ?? this.cookies,
noAuth: noAuth ?? this.noAuth,
retry: clearRetry ? null : retry ?? this.retry,
retryUnsafeRequest: retryUnsafeRequest ?? this.retryUnsafeRequest,
idempotencyKey: idempotencyKey ?? this.idempotencyKey,
cancelToken: cancelToken ?? this.cancelToken,
operationId: operationId ?? this.operationId,
log: clearLog ? null : log ?? this.log,
invalidateCacheTags: invalidateCacheTags ?? this.invalidateCacheTags,
invalidateCachePaths: invalidateCachePaths ?? this.invalidateCachePaths,
clearActiveSessionCache:
clearActiveSessionCache ?? this.clearActiveSessionCache,
);