-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hope: XMLHttpRequest in deno #2191
Comments
I believe Download progress can be measured with async function main() {
let largeFileUrl = "http://download.inspire.net.nz/data/20MB.zip";
let response = await fetch(largeFileUrl);
let contentLength = parseInt(response.headers.get("Content-Length"));
let readTotal = 0;
let buffer = new Uint8Array(4096);
let encoder = new TextEncoder();
while (true) {
let { nread, eof } = await response.body.read(buffer);
readTotal += nread;
let percent = ((readTotal / contentLength) * 100).toFixed(2);
Deno.stdout.write(encoder.encode(`\r${percent}%`));
if (eof) break;
}
}
main(); |
I really think The best thing is that is someone desired, to use the built in Deno bindings to create a polyfill in |
I agree with @kitsonk - it would be great if we didn't support XHR. @MarkTiedemann I believe that "progress events" are available through fetch streaming? |
Won’t implement |
I'm having problems with WASM files generated with emscripten because it uses in JS wrapper |
No description provided.
The text was updated successfully, but these errors were encountered: