Web Action POST and Data format
Hi there,
I'm very close to integrating a Slack Bot with Repetier Server to post updates about the server's status.
My question is: what is the form of the command that's being sent via Post? Is it using curl? I'm trying to figure out formatting for the POST data but it's not immediately clear to me what it needs to look like.
Here's a valid string which works in terminal to test my slackbot:
curl -X POST -H 'Content-type: application/json' --data '{"text":"this is a test!"}' https://hooks.slack.com/services/XXXXXXXXXX/YYYYYYYYYYYY
I'm very close to integrating a Slack Bot with Repetier Server to post updates about the server's status.
My question is: what is the form of the command that's being sent via Post? Is it using curl? I'm trying to figure out formatting for the POST data but it's not immediately clear to me what it needs to look like.
Here's a valid string which works in terminal to test my slackbot:
curl -X POST -H 'Content-type: application/json' --data '{"text":"this is a test!"}' https://hooks.slack.com/services/XXXXXXXXXX/YYYYYYYYYYYY
Comments
Which solution do you use for sendinf? webaction or computed expression http_post or http_post_json?
http_post send as form data while http_post_json uses content type application/json and sends also as body.
{"text": "$1 - Print is finished"}
Could you also do me a favor and obfuscate the link in my original post? I would have edited it myself if I could. Thanks.