diff options
author | Takeshi Kurosawa <taken.spc@gmail.com> | 2021-05-28 15:31:18 +0900 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2021-05-31 16:37:35 +0200 |
commit | 18db5be38611d5b7e8c8635bc55127f3f59bfdbd (patch) | |
tree | fffc463474aee78acfc49736da735a4e7994a2e1 /docs/runtime/http_server_apis.md | |
parent | c00f9ad515561921894580d6d7132f65e70eae0a (diff) |
docs(runtime): fix fetch API usage of HTTP server (#10777)
Diffstat (limited to 'docs/runtime/http_server_apis.md')
-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, + }), + ); } } ``` |