diff --git a/src/Libs/Request.php b/src/Libs/Request.php index eb7a938..c837afa 100644 --- a/src/Libs/Request.php +++ b/src/Libs/Request.php @@ -22,6 +22,7 @@ class Request extends Neuron { public Neuron $params; public string $path; public string $error; + public string $body; public array $next; /** @@ -37,11 +38,12 @@ class Request extends Neuron { $this->put = new Neuron(); $this->patch = new Neuron(); $this->delete = new Neuron(); + $this->body = file_get_contents("php://input"); $contentType = isset($_SERVER["CONTENT_TYPE"]) ? trim($_SERVER["CONTENT_TYPE"]) : ''; if ($contentType === "application/json") $this->json = new Neuron( - (object) json_decode(trim(file_get_contents("php://input")), false) + (object) json_decode(trim($this->body), false) ); else { $this->json = new Neuron();