I am trying to make a simple GET request on a Server in JQuery.
$.ajax({
headers: {
"Authorization": "Basic " + btoa("hello" + ":" + "world")
},
url: "http://hello.world?Id=1",
method: "GET",
success: function () {
},
}).then(function () {
});
The Problem is that when the Request gets sent, the Authentication Header is not put into the request correctly:
Host: hello.world
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Access-Control-Request-Method: GET
Access-Control-Request-Headers: authorization
Origin: null
Connection: keep-alive
Cache-Control: max-age=0