summaryrefslogtreecommitdiff
path: root/docs/runtime/http_server_apis.md
diff options
context:
space:
mode:
authorTakeshi Kurosawa <taken.spc@gmail.com>2021-05-28 15:31:18 +0900
committerBert Belder <bertbelder@gmail.com>2021-05-31 16:37:35 +0200
commit18db5be38611d5b7e8c8635bc55127f3f59bfdbd (patch)
treefffc463474aee78acfc49736da735a4e7994a2e1 /docs/runtime/http_server_apis.md
parentc00f9ad515561921894580d6d7132f65e70eae0a (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.md8
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,
+ }),
+ );
}
}
```