如何通过Webhook发送R输出

时间:2020-05-18 19:08:10

标签: r json webhooks httr

我需要将已运行的R代码的输出发送到Webhook通道。我尝试通过webhook将一些文本发送到频道,效果很好。但是,当我尝试上述代码集时,警报并没有通过webhook推送。

library(httr)
webhook_url <- "https://outlook.office.com/webhook/3bfa47e5-9abd"
list1 <- head(as.data.frame(installed.packages()))
list2 <- lapply(list1$Package, require, character.only = TRUE)
my_out <- capture.output(list2)
POST(webhook_url, body = list(text = my_out), encode = "json")

任何帮助将不胜感激。谢谢!

0 个答案:

没有答案