评论列表
oyzm 2022-10-14 19:27:20 回复
var settings = {
"url": "http://172.16.2.100/zentao/api.php/v1/tokens",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"Cookie": "device=desktop; lang=zh-cn; theme=default; zentaosid=14rhj7qr73uol37e1pgcq9q5q0"
},
"data": JSON.stringify({
"account": "***",
"password": "***"
}),
};

$.ajax(settings).done(function (response) {
console.log(response);
});

postman:测试返回:{"errcode":401,"errmsg":"\u7f3a\u5c11code\u53c2\u6570"} 禅道测试版本:企业版 4.1.1
回复
当前版本不支持restful格式的api,可以在后台-二次开发-api中查看json类型的api接口。