X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FModule%2FResponse.php;h=d38b330bb3bd57fa1a6c337354d05041b50b18bc;hb=302619a5de7e694acc2d6883af77fa9b051bb974;hp=dc11c9908df0c34c5a4fd10c167c7e92d90cef70;hpb=1239ce1e7e53298154ed9f1fa50c9dc8f6c02c98;p=friendica.git diff --git a/src/Module/Response.php b/src/Module/Response.php index dc11c9908d..d38b330bb3 100644 --- a/src/Module/Response.php +++ b/src/Module/Response.php @@ -1,6 +1,6 @@ type = $type; } + /** + * {@inheritDoc} + */ + public function setStatus(int $status = 200, ?string $reason = null): void + { + $this->status = $status; + $this->reason = $reason; + } + /** * {@inheritDoc} */ @@ -127,6 +143,6 @@ class Response implements ICanCreateResponses // Setting the response type as an X-header for direct usage $this->headers[static::X_HEADER] = $this->type; - return new \GuzzleHttp\Psr7\Response(200, $this->headers, $this->content); + return new \GuzzleHttp\Psr7\Response($this->status, $this->headers, $this->content, '1.1', $this->reason); } }