]> git.mxchange.org Git - friendica.git/blobdiff - src/Capabilities/ICanCreateResponses.php
Add explicit status setting for PSR/ResponseInterface & add tests for OPTIONS endpoint
[friendica.git] / src / Capabilities / ICanCreateResponses.php
index f0dac471f5ba8f99a6fba447d2562f40f83cfbcb..96149bab108fa44010bb52abf602d823d2227d05 100644 (file)
@@ -70,6 +70,16 @@ interface ICanCreateResponses
         */
        public function setType(string $type, ?string $content_type = null): void;
 
+       /**
+        * Sets the status and the reason for the response
+        *
+        * @param int $status The HTTP status code
+        * @param null|string $reason Reason phrase (when empty a default will be used based on the status code)
+        *
+        * @return void
+        */
+       public function setStatus(int $status = 200, ?string $reason = null): void;
+
        /**
         * Creates a PSR-7 compliant interface
         * @see https://www.php-fig.org/psr/psr-7/