diff options
Diffstat (limited to 'std/http/README.md')
-rw-r--r-- | std/http/README.md | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/std/http/README.md b/std/http/README.md index 459c8e286..993b46cb8 100644 --- a/std/http/README.md +++ b/std/http/README.md @@ -2,11 +2,10 @@ ```typescript import { serve } from "https://deno.land/std/http/server.ts"; -const body = new TextEncoder().encode("Hello World\n"); const s = serve({ port: 8000 }); console.log("http://localhost:8000/"); for await (const req of s) { - req.respond({ body }); + req.respond({ body: "Hello World\n" }); } ``` |