本节内容为Ruby实现GoEasy Rest接口发送消息, 使用时,可参阅Rest接口的详细介绍
require 'net/http'
class GoEasyClient
def self.send(channel, content)
Thread.new {
Net::HTTP.post_form(URI("http(s)://<REST Host>/publish"),
{appkey: "BC-xxxxxxxxx", channel: channel, content: content})
}
end
end
杭州: rest-hangzhou.goeasy.io
新加坡: rest-singapore.goeasy.io