$.ajax({
beforeSend: function(xhr) {
xhr.setRequestHeader('Authorization', "Basic YWRtaW46YWRtaW4=");
},
url: "https://test.com/incident.do?JSON&callback=?&sysparm_action=getRecords",
dataType: "json",
contentType: "application/json",
method: 'GET',
success: function(a,b,c) {
alert(a);
}
});
I call this function with a button press... Firebug shows that I get this JSON response (which I know is valid) [truncated for clarity]
{
"records": [
{
"service_offering": "",
"number": "INC0000009"
},
{
"service_offering": "",
"number": "INC0000010"
}
]
}
Firebug shows the error "invalid label https://test.com/incident.do?JSON&callback=jsonp1279049933243&sysparm_action=getRecords Line 1
How can I fix this? Thanks!