So i’m trying to post to a MySQL DB and the post call itself seems to be working, but the body parameter doesnt seem to be accepted / working correctly. Here is my code:
//make variable for MySQL Post to Error Log table for Error Catching
$api = $platform['api'];
$post = $api->post;
$params = '{
"resource": [
{
"error": "test",
"source": "test source"
}
],
"ids": [
0
],
"filter": "string",
"params": [
"string"
]
}';
$params = json_encode($params);
$mysqlPost= $post('mysql/_table/error_log', $params);
The message I receive back is: “No record(s) detected in request.”
I believe that either formatting of the $params variable is wrong, or that doing “$post(‘mysql/_table/error_log’, $params);” is the wrong syntax for trying to post a message body to a url.
Thanks for any help!