copyWith method
Implementation
RequestEntity copyWith({
Map<String, /* String | List<String> */ Object>? headers,
Object? body,
Encoding? encoding,
Map<String, Object>? context,
}) {
return RequestEntity(
method,
requestedUri,
url: url,
protocolVersion: protocolVersion,
pathTemplate: pathTemplate,
handlerPath: handlerPath,
body: body ?? _cachedBody ?? read(),
headers: headers ?? this.headers,
encoding: encoding ?? this.encoding,
context: context ?? this.context,
);
}