My company has an in house instant messaging system (like WhatsApp) where users can communicate with each other. I currently have code to email me certain items from my Sparc machine running SunOS 5.10. I want what I am emailing myself to now instant message me. The team that created the messenger has provided a blanket code to get this working. I know shell but not much as far as http stuff is concerned. The code they provided has a "curl" command in it. Apparently my OS doesn't support "curl". Can anybody provide an "curl" equivalent for my OS? Here is the code and notes that the messenger creators sent:
FROM_USERID=$1
FROM_PASSWORD=$2
TO=$3
MSG=$4
BOT_SERVICE="http://bots.q.mycompany.com:8011/QBotService/BotTalk"
MESSAGE="xmlMessage=<message \
type=\"contact.send.message\" \
id=\"$FROM_USERID\" \
password=\"$FROM_PASSWORD\" \
contactId=\"$TO\"> \
<statement from=\"$FROM_USERID\" \
to=\"$TO\" \
text=\"$MSG\"/></message>"
## echo $MESSAGE - uncomment this if debugging, to see the string sent to the Bot Service
## (1) use this command to suppress display of the response
curl -s -d "${MESSAGE// /%20}" $BOT_SERVICE > /dev/null
## (2) use this command to display the response from the Bot Service - helpful for debugging
## curl -s -d "${MESSAGE// /%20}" $BOT_SERVICE
Here are the notes:
Just send this via HTTP or HTTPS to: http://bots.q.mycompany.com:8011/QBotService/BotTalk
It's best to use HTTPS and POST, but you can also send it via HTTP GET with ?xmlMessage=<xml here...>