I need to send a Get
request with cross domain origin with header authentication.
Its working fine in Chrome and Firefox, but I'm having issues in Safari and IE. Also in random cases it returns 401.
<script>
var url = 'username:password@anotherdomain.com';
$.ajax({
url: url,
dataType: 'jsonp',
jsonpCallback: "callback",
success: function(json) {
alert(json);
}
});
</script>
What would be the best option to solve this?