I need to add a record using mysql service in a custom php server side script,
i try:
$payload = $event[‘request’][‘payload’];
$api = $platform[‘api’];
$post = $api->post;
$arr = array(‘id’ => 999);
$msg = [‘resource’ => $arr];
$result = $post(‘mysql/_table/todo’, ‘{“resource”: $arr}’);//none of these two rows
$result = $post(‘mysql/_table/todo’, $msg); //seem to be working
My todo table is a single column table, and from the swagger definitions of the mysql service i can add new data with this body successfully,
{“resource”: [{“id”:789}]}
Thanx in advance