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;
    }
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;
    }
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 ; }
Get json raw body data
@author Adeyemi Olaoye <yemi@cottacush.com>
@param bool|false $assoc
@return array|bool|stdClass
Get json raw body data