copyWith method
Returns a copy of this response with selected fields replaced.
Passing null for data preserves the current value.
Implementation
HttpResponse copyWith({
int? statusCode,
Map<String, String>? headers,
Object? data,
}) {
return HttpResponse(
statusCode: statusCode ?? this.statusCode,
headers: headers ?? this.headers,
data: data ?? this.data,
);
}