var httpClient = addon.httpClient({
clientKey: req.session.clientKey,
userKey: userkey,
appKey: addon.key
});
httpClient.post({
url: '/rest/api/2/issue/issue-key/comment',
headers: {
'X-Atlassian-Token': 'nocheck',
},
form: {
file: [
fileData,
{
filename: 'pngImage.png',
contentType: 'image/png'
}
]
}
}, function(err, callbackRes, body) {
res.render('display', body);
});
--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var httpClient = addon.httpClient({
clientKey: req.session.clientKey,
userKey: userkey,
appKey: addon.key
});
httpClient.post({
url: '/rest/api/2/issue/issue-key/comment',
headers: {
'X-Atlassian-Token': 'nocheck',
'Content-Type': 'application/json',
'Accept': 'application/json'
},
data: {
"body":"This is a my comment through rest api",
}
}, function(err, callbackRes, body) {
console.log( "body:" + JSON.stringify(body) + " callbackRes : " + JSON.stringify(callbackRes));
});