summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-05-03 01:23:19 +0200
committerGitHub <noreply@github.com>2021-05-02 19:23:19 -0400
commitc9ac851b9005e5a1e90016e52b3a10dd1f1012b7 (patch)
tree233768d22f674b53733e3057e81324017004dcbf
parent8377957666d6ca80d48d6fa78afd3e16bf3f7aa8 (diff)
cleanup(bench/deno_http_native): don't use Deno.core funcs (#10460)
`Deno.core.*` is unstable and not fit for public consumption, although this is a somewhat internal bench some people may use it as reference code and start using `Deno.core.encode()` in their own code
-rw-r--r--cli/bench/deno_http_native.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/bench/deno_http_native.js b/cli/bench/deno_http_native.js
index 57c19b4b9..4c06bd7c1 100644
--- a/cli/bench/deno_http_native.js
+++ b/cli/bench/deno_http_native.js
@@ -5,7 +5,8 @@ const [hostname, port] = addr.split(":");
const listener = Deno.listen({ hostname, port: Number(port) });
console.log("Server listening on", addr);
-const body = Deno.core.encode("Hello World");
+const encoder = new TextEncoder();
+const body = encoder.encode("Hello World");
for await (const conn of listener) {
(async () => {