首页 > 解决方案 > Trello API - 创建新卡片 - 名称

问题描述

我正在尝试使用 Trello API 在 JavaScript 中创建一张新卡片。我有这个:

const fetch = require('node-fetch');
fetch(`https://api.trello.com/1/cards?key=${key}&token=${token}&idList=${listId}&desc=test&name=${name}`, {
method: 'POST'
})

有用。但如果名字test#1是它只保存test。我怎样才能解决这个问题?

标签: javascripttrellonode-fetch

解决方案


您需要先编码。例如-“John#1”将被编码为“John%231”

您可以查看此站点-> https://www.urlencoder.org/


推荐阅读