Hi
I am trying out the rest apis given in Tutorial 3.
However, when I am working with Insert and update functions, the post parameters don't get recognized in my code.
$app->post('/api/robots', function() use ($app) {
$robot = json_decode($app->request->getRawBody());
// rest of my code
} ```
My $robot value is null and hence I am not able to process rest of the parts of the function.
Any idea where I might be going wrong? Any help is appreciated.
Thanks!