copyWith<NewBodyType> method
CloudflareHTTPResponse<NewBodyType>
copyWith<NewBodyType>({
- BaseResponse? base,
- NewBodyType? body,
- Object? bodyError,
Makes a copy of this Response, replacing original values with the given ones. This method can also alter the type of the response body.
Implementation
CloudflareHTTPResponse<NewBodyType> copyWith<NewBodyType>({
http.BaseResponse? base,
NewBodyType? body,
Object? bodyError,
}) =>
CloudflareHTTPResponse<NewBodyType>(
base ?? this.base,
body ?? (this.body as NewBodyType),
error: bodyError ?? error,
);