I created a custom API REST :
This is a POST request, with JSON in the body.
Example :
{
"my_test_here": [
{
"first_field": "value1",
"second_field": "value2",
"and_so_on": "value3"
}
]
}
In my code, I try to get the JSON information but all my attempts are empty :
$this->request1->getParams(); // with @var \Magento\Framework\App\Request\Http $request1 $this->request2->getParams(); // with @var \Magento\Framework\Webapi\Rest\Request $request2
I try with getPost()
also, but still empty...
Do you have any idea how to do ?