response from gadgets.io.makeRequest returns empty text field

Sridhar Muruganandham January 23, 2018

Hi ,


We are using gadgets.io.makeRequest to call the JIRA APIs. Our calling method looks like,

function getTickets(url) {
var params = {};
params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;
params[gadgets.io.RequestParameters.HEADERS] = {
"Authorization" : "Basic jijlsjkls==="
}
gadgets.io.makeRequest(url, response7, params);

function response7(obj)
{
var jsondata = obj.text;
var js=JSON.parse(jsondata);
tickets=(js.issues[0].fields.description).split(",");
};

 

But we are getting the response with empty "text" field

{text: "", rc: 500, headers: {…}, oauthApprovalUrl: undefined, oauthError: undefined, …},

 

We are facing this issues from today and we checked the same before a week with same code and it worked fine. But now it is failing.

Note:

1. We tried the same with calling with the xmlhttprequest, where it is working fine. Is there any change made to gadgets.io.makeRequest? or do we ignore some other.

2. We used same gadgets.io.makeRequest to call the stash APIs and it is working perfectly fine. Is something changes related to JIRA?

 

Please provide some fix, as we are using lot of gadgets.io.makeRequest in our custom gadgets.

0 answers

Suggest an answer

Log in or Sign up to answer