This commit is contained in:
Bruno Windels 2020-10-27 13:51:40 +01:00
parent 2ebce8eb7b
commit ade01f6cf7

View file

@ -38,6 +38,7 @@ class RequestResult {
function send(url, {method, headers, timeout, body, format}) { function send(url, {method, headers, timeout, body, format}) {
const xhr = new XMLHttpRequest(); const xhr = new XMLHttpRequest();
xhr.open(method, url); xhr.open(method, url);
if (format === "buffer") { if (format === "buffer") {
// important to call this after calling open // important to call this after calling open
xhr.responseType = "arraybuffer"; xhr.responseType = "arraybuffer";