diff options
author | Takeshi Kurosawa <taken.spc@gmail.com> | 2021-05-28 15:31:18 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 15:31:18 +0900 |
commit | 76e2edc7e1868d7768e259aacbb9a991e1afc462 (patch) | |
tree | 27b268368a28267e7bc256300cdd6bd4d44451a7 /docs/runtime | |
parent | 59237d195f6afa0d8927128751ba5ff4562d7cce (diff) |
docs(runtime): fix fetch API usage of HTTP server (#10777)
Diffstat (limited to 'docs/runtime')
-rw-r--r-- | docs/runtime/http_server_apis.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/runtime/http_server_apis.md b/docs/runtime/http_server_apis.md index 9880b542a..2b4d6f27b 100644 --- a/docs/runtime/http_server_apis.md +++ b/docs/runtime/http_server_apis.md @@ -204,9 +204,11 @@ object. Responding with a basic "hello world" would look like this: async function handle(conn: Deno.Conn) { const httpConn = Deno.serveHttp(conn); for await (const requestEvent of httpConn) { - await requestEvent.respondWith(new Response("hello world"), { - status: 200, - }); + await requestEvent.respondWith( + new Response("hello world", { + status: 200, + }), + ); } } ``` |