diff --git a/lib/mvcfronk/mfBase/mfBaseApicontroller.php b/lib/mvcfronk/mfBase/mfBaseApicontroller.php index 2425c85e8..3fcfabc01 100644 --- a/lib/mvcfronk/mfBase/mfBaseApicontroller.php +++ b/lib/mvcfronk/mfBase/mfBaseApicontroller.php @@ -20,6 +20,7 @@ class mfBaseApicontroller { protected $headers = []; protected $route; protected $request_json; + protected $raw_post_body; protected $get = []; protected $post = []; protected $format = "default"; @@ -93,6 +94,7 @@ class mfBaseApicontroller { } private function logRequest2() { + $this->requestLog->debug("POST Raw: ".$this->raw_post_body); $this->requestLog->debug("POST JSON: ".$this->request_json); $this->requestLog->debug("Headers: ".print_r($this->headers, true)); } @@ -180,9 +182,9 @@ class mfBaseApicontroller { } private function getRequestBody() { + $this->raw_post_body = file_get_contents('php://input'); if(strtolower($this->headers['content-type']) == "application/json") { - $request_body = file_get_contents('php://input'); - return $request_body; + return $this->raw_post_body; } return $_POST;