问题很可能是我对jira的身份验证,每当我尝试获取数据时,它总是显示总共0个问题...这是不正常的,即使当我注销jira时,json数据响应也始终为0 (提供图片)。任何帮助将不胜感激,谢谢。
var base64 = require('base-64');
var request = require('request');
var options = {
method: 'GET',
url: 'http://ksr-ca-qmaltjira.ca.kronos.com:8061/rest/api/2/search',
headers: {
"Autorization ": "Basic " + base64.encode(username:password),
"Content-Type": "application/json"
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(
'Response: ' + response.statusCode + ' ' + response.statusMessage
);
console.log(body);
});