将消息卡发布到目标后,团队输入返回空白

时间:2020-03-10 06:06:37

标签: webhooks microsoft-teams office365connectors

我正在尝试通过卡片从用户那里获取一些信息,目标网址收到的是空帖请求,而不是用户输入。这是代码

requests.post(url="incoming webhook",
json=
{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "summary": "John Doe",
    "title": "input",
    "potentialAction": [
      {

        "@type": "ActionCard",
        "name": "Change status",
        "inputs": [{
            "@type": "MultichoiceInput",
            "id": "list",
            "title": "Select a status",
            "isMultiSelect": "true",
            "style":"compact",

            "choices": [{
                "display": "OBE",
                "value": "OBE"
            }, {
                "display": "OUI",
                "value": "OUI"
            }, ]
        }],
        "actions": [{
            "@type": "HttpPOST",
            "name": "Save",
            "target": "aworkingurl",

        }]

      }]})

我使用的URL来自一个名为webhooks.site的站点,该站点提供接受POST和GET请求的URL,该站点显示已尝试进行POST,但内容为空,但是当我将一些字符串发布到同一URL时它表明数据很好。

0 个答案:

没有答案