Response toResponse([int? statusCode]) { return Response( statusCode ?? this.statusCode, body: jsonEncode(toJson()), headers: {'content-type': 'application/json'}, ); }