diff --git a/http-server/Message/Request.php b/http-server/Message/Request.php index 24e47b9c..b3410702 100644 --- a/http-server/Message/Request.php +++ b/http-server/Message/Request.php @@ -44,7 +44,6 @@ class Request implements RequestInterface public ?AuthIdentity $authority = null; - /** * @return int */ @@ -143,6 +142,21 @@ class Request implements RequestInterface } + /** + * @return array + */ + public function all(): array + { + if (empty($this->parseBody)) { + $this->parseBody = $this->parseBody($this->stream); + } + return array_merge($this->serverRequest->post ?? [], + $this->serverRequest->get ?? [], + is_array($this->parseBody) ? $this->parseBody : [] + ); + } + + /** * @return string */