aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Http/WellKnown/GenericResponse.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Http/WellKnown/GenericResponse.php')
-rw-r--r--lib/public/Http/WellKnown/GenericResponse.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/public/Http/WellKnown/GenericResponse.php b/lib/public/Http/WellKnown/GenericResponse.php
new file mode 100644
index 00000000000..c5279f075c9
--- /dev/null
+++ b/lib/public/Http/WellKnown/GenericResponse.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCP\Http\WellKnown;
+
+use OCP\AppFramework\Http\Response;
+
+/**
+ * @since 21.0.0
+ */
+final class GenericResponse implements IResponse {
+ /** @var Response */
+ private $response;
+
+ /**
+ * @since 21.0.0
+ */
+ public function __construct(Response $response) {
+ $this->response = $response;
+ }
+
+ /**
+ * @since 21.0.0
+ */
+ public function toHttpResponse(): Response {
+ return $this->response;
+ }
+}