我正在尝试使用 Azure DevOps REST API 创建一个工作项。我已经能够做其他事情,比如运行 WIQL 查询,但是当我尝试创建一个工作项时,我得到了这个神秘的三重错误:
值是必需的,但在请求中不存在
值是必需的,但在请求中不存在
值是必需的,但在请求中不存在
这是完整的回应。
{
"count": 1,
"value": {
"Message": "A value is required but was not present in the request.\r\nA value is required but was not present in the request.\r\nA value is required but was not present in the request.\r\n"
}
}
Run Code Online (Sandbox Code Playgroud)
这就是我正在尝试做的事情,尽我所能遵循文档。
注意:正如接受的答案所说,问题是一个错字,&紧跟?在 URL 之后。由于这些示例在其他方面有效,为了任何想要复制和粘贴的人的利益,我已经修复了错字。
const fetch = require('node-fetch');
const username = '[username]';
const password = '[personal access token]'
const organization = …Run Code Online (Sandbox Code Playgroud)