diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-05-03 01:23:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-02 19:23:19 -0400 |
commit | c9ac851b9005e5a1e90016e52b3a10dd1f1012b7 (patch) | |
tree | 233768d22f674b53733e3057e81324017004dcbf | |
parent | 8377957666d6ca80d48d6fa78afd3e16bf3f7aa8 (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.js | 3 |
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 () => { |