Hi Team,
I’m testing some JSD experimental methods. JSD requires the header X-ExperimentalApi: opt-in to be set.
I’m trying to send the header when calling from my js cloud addon to JIRA using AP.request but I cannot. It seems that the headers: parameter is restricted to ‘Accept’, ‘If-Match’ and ‘If-None-Match’ for some reason?
https://developer.atlassian.com/cloud/jira/platform/jsapi/request/
How can I send the X-ExperimentalApi? I’m trying something like this:
AP.require('request', function (request) {
request({
url: url,
dataType: 'json',
headers: {'X-ExperimentalApi': 'opt-in'}, <-- doesn't work
success: function (data, message, xhr) {
...
},
error: function (xhr) {
...
}
})
});
Cheers
Fernando