1

我使用以下内容发布到Slack 的 传入 Webhook

slack_incoming_webhook = 'URL....."
payload={
        "text"=> bot_response[:bot_response],
         "channel"=>"@mememem"
    }

jsonresponse = RestClient.post slack_incoming_webhook, payload, :content_type => 'application/json'

我收到以下错误:

RestClient::InternalServerError: 500 内部服务器错误

当我在 request_bin 上检查该帖子时,该帖子似乎正确发布,因此我不清楚如何解决此错误。

4

1 回答 1

1

尝试

require 'json'
payload={   
        "text"=> bot_response[:bot_response],
         "channel"=>"@mememem"
    }.to_json
于 2015-06-06T05:25:03.257 回答