get request with headers in jquery code example
Example: jquery get request with headers
$.ajax({
url: "http://localhost/myawsomecode/",
data: { param1: 'anyvalue', param2: 'othervalue' },
type: "GET",
beforeSend: function(xhr){xhr.setRequestHeader('X-Test-Header', 'SetHereYourValueForTheHeader');},
success: function() { alert('Success!'); }
});