问题描述
我正在使用 c# 中的 .NET 创建一个应用程序,以在 Trello 板上创建卡片,但我无法更新自定义字段。 我已经搜索了 API 文档和互联网,但无法使其正常工作。
private static async Task<String> PutCustomFieldsAsync(string Url,string jsonContent)
{
using (var httpClient = new HttpClient())
{
var response = await httpClient.PutAsync(Url,new StringContent(jsonContent,System.Text.Encoding.UTF8,"application/json"));
json = await response.Content.ReadAsstringAsync();
};
return json;
}
变量的值如下:
网址:“https://api.trello.com/1/cards/6...3fe/customField/5...bb9/item?key=4...f&token=e...6”
jsonContent: "{"Value":{"text":"test"}}"
当我在 Trello 上手动设置字段,然后获取卡片自定义字段时,生成的 JSON 具有以下数据:
{
"id": "6...c66","value": {
"text": "teste"
},"idCustomField": "5...bb9","idModel": "6...3fe","modelType": "card"
}
由于“自定义字段类型的值无效”,我得到的响应是“400 Bad Request”。
谁能帮我让它工作起来?
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)