Hi,
short information befor: im a new with typo3.
For my use case, i need access to the basic php $_POST and $_GET values over php or typoscript.
I was try to use a ext for the restapi function but in my taks both ext are not working… I try it with t3api and nnrestapi.
Now i will try it with my own small ext to create a simple rest api for post and get.
My Template TypoScript are this
# Default PAGE object:
page = PAGE
page.10 = TEXT
//page.10 < styles.content.get
page.20 = USER_INT
page.20 {
userFunc = Rest\Fheprotimb\Domain\Model\RestAPI->test
}
And my RestAPI php file are this
class RestAPI extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
//public $myVar = \TYPO3\CMS\Core\Utility\GeneralUtility
public function test(string $content, array $conf) //: string
{
$post;
try{
$post = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST(); //_Post()
}
catch(Exception $error) {
$post['name'] = "error :" . $error->getMessage();
}
return "PostValue Name : " . $post['name'];
}
}
The php script works well, but the data from $_POST and $_GET are not available…
I hope i can fix this with the help from the typo3 community