I am trying to call rest api using this codes response is coming in error.
It should be in success. Can somebody help me on this. if u hit the url in browser you will get the response in a json structure.
var url = 'http://54.217.223.37:8000/sap/bc/ztest_specific?sap-client=998';
$.ajax({
contentType: 'application/json; charset=utf-8',
url: url,
type: "GET",
jsonpCallback: 'processJSON',
dataType:'jsonp',
data:{'_CUST':'0000001000'},
async : false,
headers:{
'Authorization':'Basic ZGRpYzpzYXA0Y250YQ=='
},
success: function (result) {
alert('s');
console.log(result.text);
},
error: function (aaa) {
// log error in browser
alert('e');
console.log(aaa);
}
});