The set of code i'm using is this
app.post('/attach', addon.authenticate(),function(req, res) {
addon.httpClient(req).post({
url: '/rest/api/2/issue/issue-key/attachments',
headers: {
'X-Atlassian-Token': 'nocheck'
},
form: {
file: [
fileData,
{
filename: 'test.png',
contentType: 'image/png'
}
]
}
}, function(err, callbackRes, body) {
});
});
Can anyone tell me how to make this working for custom ajax requests?
--
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.
--
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.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connect-dev+unsub...@googlegroups.com.
---Travis
addon.httpClient({
clientKey: req.session.clientKey,
userKey: userKey, // how to get this
appKey: addon.key
});