copyWith method

Request copyWith({
  1. Map<String, Object?>? headers,
  2. String? path,
  3. Object? body,
})

Creates a new Request by copying existing values and applying specified changes.

Implementation

Request copyWith({
  Map<String, Object?>? headers,
  String? path,
  Object? body,
}) {
  return Request._(_request.change(headers: headers, path: path, body: body));
}