protected function getRequestData()
    {
        if ($this->PWE->getHeader('content-type') != 'application/json') {
            throw new HTTP4xxException("API requires 'application/json' as type for request body", HTTP4xxException::UNSUPPORTED_MEDIA_TYPE);
        }

        return json_decode(file_get_contents("php://input"), true);
    }