This is a cross domain POST with HTTP Basic Authentication. Because of CORS, chrome browser instead of POST sends an OPTIONS message challenge for originate. If I changed url to same domain, it works. If I disabled authentication, it also works. But I have to POST to the other domain, which is not under my control, that means I cannot use solutions like easyXDM. They also require HTTP Basic Authentication. I have been looking for solution for a week. Any hint is appreciated.
OPTIONS), there is nothing you can do about it - SLaks 2012-04-04 19:46
Did you try:
xhr.setRequestHeader("Authorization", "Basic " + encodeBase64(username + ":" + password) //usage: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==