【发布时间】:2016-07-06 03:03:14
【问题描述】:
尝试使用 Manatee Trello(BRILLIANT 库)的 Webhook 功能,实时更新用户在板上交互的卡片。
我运行这段代码:
Card card = new Search(SearchFor.TextInDescription("id: 2643"), modelTypes: SearchModelType.Cards).Cards.Single();
Webhook<Card> webhook = new Webhook<Card>(card, "http://<host>/api/webhooks/incoming/trello");
并得到这个错误:
StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=15768000
X-XSS-Protection: 1; mode=block
X-FRAME-OPTIONS: DENY
X-Trello-Version: 1.598.0
X-Trello-Environment: Production
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, PUT, POST, DELETE
Vary: Accept-Encoding
Cache-Control: no-store, must-revalidate, no-cache, max-age=0
Date: Sat, 19 Mar 2016 14:22:06 GMT
ETag: W/"76-fa944d06"
Content-Length: 118
Content-Type: text/plain; charset=utf-8
Expires: Thu, 01 Jan 1970 00:00:00 GMT
}
有什么想法吗?任何帮助将不胜感激。
【问题讨论】:
-
感谢您使用 Manatee.Trello!您必须创建一个 webhook。我会制作一个样本并将其发布给您。然后我会更新文档以使其更清晰。
-
请在我的BitBucket repo 上创建一个问题。我想在那里追踪这个。另外,我将不得不将此传递给Trello team。他们报告说我没有发送有效的 JSON。问题解决后,我会在这里发帖。
标签: trello manatee.trello