hello,
I'm trying to call confluence search API with ajax from outside the environment, but get below error, when i click on the search(1,11), i can get the expected result, please advise.
+++++++++++ ERROR ++++++++++++++++++++++++++
SCRIPT1004: Expected ';'
search(1,11)
{"description":"jCallback was not called","stack":"Error: jCallback was not called...
+++++++++++ CODE +++++++++++++++++++++++++++
function jCallback(json){
console.log(json);
}
var wikiAPI = "https://xx.xx/confluence/rest/searchv3/1.0/search?queryString=global&pageSize=10&os_authType=basic";
$.ajax({
url:wikiAPI,
type:"GET",
contentType:'application/jsonp',
dataType:"jsonp",
crossDomain:true,
beforeSend: function(xhr) { xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); },
jsonpCallback:'jCallback',
error: function(xhr,status,error) {
console.log(JSON.stringify(error));
},
success: function(response){
console.log(response);
}
});
Hi,
you should try asking this question to the developer community. I'm pretty sure you'll find some help there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.