I spent some time this evening writing the code that adds a similar method to XHR of Google Chrome, but my implementation should theoretically work with any browser that implements the latest web standards. I did not spend much time testing the code, so it might have bugs in it. It probably is not the most efficient way either. I am just publishing it here in spirit of release early release often.
XMLHttpRequest.prototype.sendAsBinary = function(datastr) {
var bb = new BlobBuilder();
var data = new ArrayBuffer(1);
var ui8a = new Uint8Array(data, 0);
for (var i in datastr) {
if (datastr.hasOwnProperty(i)) {
var chr = datastr[i];
var charcode = chr.charCodeAt(0)
var lowbyte = (charcode & 0xff)
ui8a[0] = lowbyte;
bb.append(data);
}
}
var blob = bb.getBlob();
this.send(blob);
}