GET respnse is always empty but with status 200

hello,

I am trying to use API so I tested it with Postman and it did work but when I use Mozilla Firefox it answers with status ok 200 but without any response.

please, can anyone help me?

this my JavaScript code:

 var settings = {
              "async": true,
              "crossDomain": true,
              "url": "http://localhost:8080/rest/api/2/issuetype/10006",
              "method": "GET",
              "headers": {
                "cache-control": "no-cache",
               "postman-token": "05769be8-57c8-6710-91ad-eff30eaa2ab4"
              },
              "data": "{ \"username\": \"admin\", \"password\": \"admin\" }"
            }

            jQuery.ajax(settings).error(function (response) {
              console.log('++++++++++++++++++++++++This is it :'+response);
            });

error function work and the response is always empty.

1 answer

0 votes
Josh Steckler Community Champion Jul 26, 2017

You might need to look into adding Accept and Content-Type headers too.

Both should be "application/json"

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

192 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you