I am trying to send an Ajax request to indeed.com. They provide an xml API that allows us to search their job board. I can type my search into the url of my browser, but I cannot do it in JavaScript.

// attempt to make an XMLHttpRequest to indeed.com
// jQuery 1.6.1 and Chrome dev 13.0.767
function makeRequest() {
alert("inside makeRequest()");
var settings = {
type: "GET",
url:URL+"?"+REQUEST,
dataType:"xml",
error: function(XHR,textStatus,errorThrown) {
alert ("XHR="+XHR+"\ntextStatus="+textStatus+"\nerrorThrown=" + errorThrown);
},
success: function(data,textStatus) {
$("body").append(data);
},
headers: {
"Access-Control-Allow-Origin":"http://example.edu",
"Access-Control-Allow-Headers":"X-Requested-With"
}
};
$.ajax(settings);
}

I could find no documentation about how to set the request headers, and I find the error message doesn't change if I change the origin (http://example.edu), so I think something about those headers is the problem. Here is the error I get:

Origin http://example.edu is not allowed by Access-Control-Allow-Origin

Thanks for any help you might offer!