1$.ajax({
2 url: "http://localhost/myawsomecode/",
3 data: { param1: 'anyvalue', param2: 'othervalue' },
4 type: "GET",
5 beforeSend: function(xhr){xhr.setRequestHeader('X-Test-Header', 'SetHereYourValueForTheHeader');},
6 success: function() { alert('Success!'); }
7 });