Sending authorization headers with jquery and ajax
I have looked at the following questions here on stackoverflow with no luck in what im trying to do. Ajax Authorization Request headers fails again and again jQuery Ajax Unauthorized 401 Error Sending credentials with cross-domain posts? Here is my code that I currently have: $(document).ready(function() { $.ajax({ url: 'http://sample.domain.com/script.php?name1=value1&jsonp=?', type: 'GET', dataType: 'json', contentType: "application/json", beforeSend: function(xhr) { xhr.setRequestHeader("Authentication", "Basic ZnJvbWFwcGx********uOnRoM24zcmQ1UmgzcjM=") //Some characters have been replaced