尝试使用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
}
任何人的想法?任何帮助将不胜感激。
答案 0 :(得分:0)
Manatee.Trello.WebApi中有一个错误。似乎Manatee.Trello.RestSharp对此调用没有问题。我会在发现问题后立即发布修补程序。
我已将文本编码更新为UTF-8。记录已解决的响应JSON数据也存在内部问题。
请下载Manatee.Trello v1.8.3和Manatee.Trello.WebApi v1.0.3。这个版本应该解决这个问题。