diff --git a/src/engines/BandwidthEngine/BandwidthEngine.js b/src/engines/BandwidthEngine/BandwidthEngine.js index ea07f70..fac8c7a 100644 --- a/src/engines/BandwidthEngine/BandwidthEngine.js +++ b/src/engines/BandwidthEngine/BandwidthEngine.js @@ -303,15 +303,17 @@ class BandwidthMeasurementEngine { return r; }) .then(r => - r.text().then(body => { - this.#responseHook && - this.#responseHook({ - url, - headers: r.headers, - body + r.blob().then(blob => { + if (this.#responseHook) { + blob.text().then(body => { + this.#responseHook({ + url, + headers: r.headers, + body + }); }); - - return body; + } + return blob; }) ) .then(() => {