copyWith method
Unchanged data shares the existing immutable snapshot. New caller-owned headers or bytes are copied at this ownership boundary.
Implementation
DeekWebPreparedRequest copyWith(
{String? method,
Uri? uri,
Map<String, String>? headers,
List<int>? bodyBytes}) =>
DeekWebPreparedRequest._(
method ?? this.method,
uri ?? this.uri,
headers == null
? this.headers
: UnmodifiableMapView(_HeaderMap(headers)),
bodyBytes == null
? _bytes
: Uint8List.fromList(bodyBytes).asUnmodifiableView(),
);