我喜欢为HipChat创建一个webhook,这样当在聊天中输入/sayhi时,就会返回一个简单的Hi。
我查看了他们的api https://www.hipchat.com/docs/apiv2/method/create_room_webhook,据说是将一个PUT发送到
/v2/room/{room_id_or_name}/extension/webhook/{key}所以我写了下面的脚本
curl -d '{"name":"simpletest","url":"http://myserser/myapp/myresource",
"pattern":"^\\/hello$","key":"my.simple.webhook","event":"room_message"}'
-H 'Content-Type: application/json'
https://our.hipchat.com/v2/room/2202432/extension
/webhook/my.simple.webhook?auth_token=token但运行此命令会返回
{
"error": {
"code": 405,
"message": "<p>The method is not allowed for the requested URL.</p>",
"type": "Method Not Allowed"
}
}有人能解释一下如何正确地设置它吗?谢谢你的帮助
发布于 2016-02-22 21:29:36
最终找到了https://developer.atlassian.com/hipchat/tutorials/building-a-simple-add-on-using-a-wizard,在那里它得到了详细的解释,并且它正在工作。
最后,这是我这边的一个错误配置
https://stackoverflow.com/questions/35500499
复制相似问题