简体   繁体   中英

Posting to Hubot via Curl

I'm running Hubot on Heroku and have connected it to Hipchat.

I'd now like to use Curl to post third-party information to the Hubot, when appropriate.

There are two scripts that seem the right fit, http-post-say.coffee or http-say.coffee . I can't get either to work.

http-post-say points to port 8080, which I don't believe will work on Heroku, and http-say simply doesn't post, without any error message.

Both scripts have zero config, and I've successfully deployed several other scripts, so I'm at a loss.

Has anyone successfully used either script in the scenario I've described, or taken a different approach to reach the same goal?

This answer is a bit late.

httpd-post-say just worked for me ignore the port 8080 for heroku just use your app url (app-name.herokuapp.com). The more confusing thing for me was for room you need to use the XMPP JID which looks like 12345_something@conf.hipchat.com. So to post a message it would look as follows for heroku.

curl -X POST http://app-name.herokuapp.com/hubot/say -d message='Hello World' -d room='12345_room_name@conf.hipchat.com'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM