Hello all:
I follows the guideline to set the ajax requert,but encount some errors when 
call for it.Here are my js code:
var authorizationCode = $.base64('encode', 'ADMIN' + ":" + 'KYLIN');//ADMIN AND 
KYLIN are the username and password of login the kylin website$.ajaxSetup({     
  headers: { 'Authorization': "Basic "+ authorizationCode, 'Content-Type': 
'application/json;charset=utf-8' } // use your own authorization code here
    });     var request = $.ajax({        url: 
"http://hostname/kylin/api/query",//here the hostname I had replace it with the 
remote ip that the kylin project had reploy.        type: "POST",        data: 
'{"sql":"select count(*) from 
SUMMARY;","offset":0,"limit":50000,"acceptPartial":true,"project":"test"}',     
   dataType: "json"     });     request.done(function( msg ) {        
alert(msg);     });      request.fail(function( jqXHR, textStatus ) {        
alert( "Request failed: " + textStatus );   });The errors the web console has 
printed are as follows:net::ERR_CONNECTION_REFUSEDI want to know what's wrong 
with my settings?what do I need to do?Best wishes if any help,xingchen

Reply via email to