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
Posted Oct 16, 2018 in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

1,289 views 17 10
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