Skip to content

Instantly share code, notes, and snippets.

Last active May 21, 2022 23:13
  • Star 19 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
HipChat - Send a message to a room using cURL
# Build Passes
curl -d "room_id=ourRoom&from=BuildBot&message=Build+Status:+Passing&color=green"
# Build Fails
curl -d "room_id=ourRoom&from=BuildBot&message=Build+Status:+Failing&color=red&notify=1"
Copy link

tizzo commented Feb 14, 2014

I found the following helpful:

MESSAGE="Some crazy unescaped message with <a href=\"\">links</a> & stuff! Maybe even variables or commit messages: ${COMMIT_MESSAGE}"
curl -d $CONFIG --data-urlencode "message=${MESSAGE}" ''

This way the message is separated out more clearly and you let curl do the encoding for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment