1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00
denoland-deno/cli/tests/testdata/run/http2_request_url.ts

13 lines
284 B
TypeScript
Raw Normal View History

const listener = Deno.listen({
port: Number(Deno.args[0]),
});
console.log("READY");
for await (const conn of listener) {
for await (const { request, respondWith } of Deno.serveHttp(conn)) {
const href = new URL(request.url).href;
respondWith(new Response(href));
}
}