Last active
December 31, 2015 19:39
-
-
Save astronaughts/8034855 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- クエリ文字列から roomid を取得 | |
local roomid = request.query.roomid | |
-- http.request で ChatWork API で指定したルームにメッセージを送信 | |
local response = http.request { | |
method = 'POST', | |
url = 'https://api.chatwork.com/v1/rooms/'..roomid..'/messages', | |
headers = { | |
-- ChatWork API の token を指定 | |
['X-ChatWorkToken'] = 'YOUR_TOKEN' | |
}, | |
params = { | |
-- メッセージ内容を指定 | |
body = 'webscript からテスト' | |
} | |
} | |
-- 成功したら Status 200 を返す | |
return 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment