response method

Response response(
  1. Body? body, {
  2. int? statusCode,
  3. Map<String, dynamic>? headers,
  4. ContentType? contentType,
})

Implementation

Response response(Body? body,
    {int? statusCode,
    Map<String, dynamic>? headers,
    ContentType? contentType}) {
  // if (body is DbResult) {
  //   var h = (headers?..addAll(body.headers ?? {})) ?? {...?body.headers};
  //   return Response(
  //       body: Body(body.data),
  //       request: this,
  //       statusCode: body.statusCode ?? statusCode ?? 200,
  //       additionalHeaders: h,
  //       contentType: contentType);
  // }

  return Response(
      body: /*body is Body ? body :*/ Body(body),
      request: this,
      statusCode: statusCode ?? 200,
      additionalHeaders: headers,
      contentType: contentType);
}