【问题标题】:cURL-ing Slack posts pretext and text but not titlecURL-ing Slack 发布借口和文本,但不发布标题
【发布时间】:2017-06-22 08:57:21
【问题描述】:

curl -X POST -H 'Content-type: application/json' --data '{"title": "hello world", "pretext": "hello world", "text": "Hellow world", "channel": "#channel", "link_names": 1, "username": "GitLab"}' https://hooks.slack.com/services/TO/K/EN

上面会显示“text”和“pretext”,但不显示标题。

【问题讨论】:

    标签: curl slack slack-api


    【解决方案1】:

    它不会显示标题,因为普通消息没有标题属性。如果您想要标题,则需要在邮件中添加附件。附件可以在许多其他花哨的属性中拥有标题。

    请参阅 here 了解附件的工作原理。

    【讨论】:

      猜你喜欢
      • 2021-04-26
      • 1970-01-01
      • 2015-05-09
      • 1970-01-01
      • 1970-01-01
      • 2018-12-02
      • 1970-01-01
      • 1970-01-01
      • 2015-07-29
      相关资源
      最近更新 更多