blob: a87d5625260ba6caa4ad686ea46cf94a9d3103a9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
const file = await Deno.open(Deno.env.get("FILE") ?? "hello.txt", {
read: true,
});
console.time("stream-file-deno");
const response = await fetch(Deno.env.get("URL") ?? "http://localhost:3000", {
method: "POST",
body: file.readable,
});
console.timeEnd("stream-file-deno");
console.log("Sent", await response.text(), "bytes");
|