cURL-ing Slack发布借口和文本,但不是标题



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

上面将显示"文本"和"借口",但不显示标题。

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

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

最新更新