From 18db5be38611d5b7e8c8635bc55127f3f59bfdbd Mon Sep 17 00:00:00 2001 From: Takeshi Kurosawa Date: Fri, 28 May 2021 15:31:18 +0900 Subject: docs(runtime): fix fetch API usage of HTTP server (#10777) --- docs/runtime/http_server_apis.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs/runtime/http_server_apis.md') 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, + }), + ); } } ``` -- cgit v1.2.3