copyWith method
Creates a new Request by copying existing values and applying specified changes.
All parameters are optional. If not provided, the original values are used.
Implementation
@override
Request copyWith({final Uri? url, final Headers? headers, final Body? body}) {
return Request._(
method,
url ?? this.url,
token,
headers: headers ?? this.headers,
protocolVersion: protocolVersion,
body: body ?? this.body,
connectionInfo: connectionInfo,
);
}