asynchttpserver: cleanup example code
This commit is contained in:
parent
3effd52ca3
commit
8a0b945170
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ proc respond*(req: Request, code: HttpCode, content: string,
|
|||
## --------
|
||||
## .. code-block::nim
|
||||
## proc handler(req: Request) {.async.} =
|
||||
## if $req.url.path == "/hello-world":
|
||||
## if req.url.path == "/hello-world":
|
||||
## let msg = %* {"message": "Hello World"}
|
||||
## let headers = newHttpHeaders([("Content-Type","application/json")])
|
||||
## await req.respond(Http200, $msg, headers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue