10-14-2020 09:50 AM
Hi
My goal is to post something on Slack from my Labview Code.
I found that Slack supports JSON requests in order to post something.
curl -X POST -H 'Content-type: application/json' --data '{"text":"Hello, World!"}' https://hooks.slack.com/services/T0000000000/XXXXXXXXXXX/xxxxxxxxxxxxxxxxxxxx
You can see the instruction I received from Slack in the attachment. I'm really struggling how to put that into useable form.
I found this: https://forums.ni.com/t5/LabVIEW/Send-a-json-string-to-an-HTTP-in-labview/td-p/3102347?profile.langu...
But If I just enter this code in the text field it doesn't work. Can someone push me in the right direction?
Thanks,
Slaxx
10-14-2020 11:08 AM
I think you are looking for something like this.
Also, The POST vi returns header and body of the returned message from the server. This may give a hint why it's not working.