copyWith method
Creates a copy of this request with optional modifications.
Implementation
ClientRequest copyWith({
String? url,
String? method,
Map<String, String>? headers,
dynamic body,
Map<String, String>? queryParameters,
Map<String, dynamic>? extra,
}) {
return ClientRequest(
url: url ?? this.url,
method: method ?? this.method,
headers: headers ?? Map.from(this.headers),
body: body ?? this.body,
queryParameters: queryParameters ?? this.queryParameters,
extra: extra ?? Map.from(this.extra),
);
}