public function getPostData($assoc = false)
    {
        $postData = $this->request->getJsonRawBody($assoc);

        if (!is_object($postData) && !$assoc) {
            return new stdClass();
        }

        if (!is_array($postData) && $assoc) {
            return [];
        }

        return $postData;
    }