copyWith method

WordpressRequest copyWith({
  1. RequestUrl? url,
  2. HttpMethod? method,
  3. Map<String, dynamic>? headers,
  4. Map<String, dynamic>? queryParameters,
  5. dynamic body,
  6. WordpressEvents? events,
  7. CancelToken? cancelToken,
  8. bool? requireAuth,
  9. IAuthorization? authorization,
  10. ValidatorCallback? validator,
  11. Duration? sendTimeout,
  12. Duration? receiveTimeout,
})

Implementation

WordpressRequest copyWith({
  RequestUrl? url,
  HttpMethod? method,
  Map<String, dynamic>? headers,
  Map<String, dynamic>? queryParameters,
  dynamic body,
  WordpressEvents? events,
  CancelToken? cancelToken,
  bool? requireAuth,
  IAuthorization? authorization,
  ValidatorCallback? validator,
  Duration? sendTimeout,
  Duration? receiveTimeout,
}) {
  return WordpressRequest(
    url: url ?? this.url,
    method: method ?? this.method,
    headers: headers ?? this.headers,
    queryParameters: queryParameters ?? this.queryParameters,
    body: body ?? this.body,
    events: events ?? this.events,
    cancelToken: cancelToken ?? this.cancelToken,
    requireAuth: requireAuth ?? this.requireAuth,
    authorization: authorization ?? this.authorization,
    validator: validator ?? this.validator,
    sendTimeout: sendTimeout ?? this.sendTimeout,
    receiveTimeout: receiveTimeout ?? this.receiveTimeout,
  );
}