jpg 画像を表すバイナリ データストリームである httprequest の応答を何度も読み取ろうとした後も、まだ苦労しています。
編集:全体
xmlhttp = false;
/*@cc_on@*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end@*/
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
}
if (!xmlhttp && window.createRequest) {
try {
xmlhttp = window.createRequest();
} catch (e) {
xmlhttp = false;
}
}
xmlhttp.open("GET", theUrl, true);
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
var headers = xmlhttp.getAllResponseHeaders();
}
}
xmlhttp.send(null);
私はIE8を使用しており、HTML 5は使用していません(FF12でも試しました)ので、常に次のようなエラーが発生します
xhr.overrideMimeType('text\/plain; charset=x-user-defined');
また
xhr.responseType = "arraybuffer";
変数にコピーしても機能しません
var body = xhr.response; //.responseText , .responseBody
何が間違っているか、または私が試すことができるアイデアはありますか?