GET respnse is always empty but with status 200


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 vote
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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,319 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot