Hello there,
I am using Mattermost outgoing webhooks and trying to get the content of the POST requests.
The Content-Type is set to application/json and I am receiving a request each time someone post something in a public chat.
It is also possible to return an answer to a new request but I cannot read out the content of the POST.
Here is my php example:
<?php
header('Content-Type: application/json');
// Here I want to get the content of the message but I don't get it.
$message_content = $_POST['text'];
// This is the answer to my server and it works.
echo '{"text": "Successfully received your post."}';
?>