From de7f42a7419f33ca333ac5717b800978aaec7170 Mon Sep 17 00:00:00 2001 From: Luke Diamand Date: Tue, 10 Jan 2017 20:33:53 +0000 Subject: [PATCH] asynchttpserver: import json in the example code The example code won't compile unless json is imported, because of the use of the %* operator. This can trip-up inexperienced Nim developers. --- lib/pure/asynchttpserver.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pure/asynchttpserver.nim b/lib/pure/asynchttpserver.nim index 68da5f7c9d..a558d9d7ee 100644 --- a/lib/pure/asynchttpserver.nim +++ b/lib/pure/asynchttpserver.nim @@ -85,6 +85,7 @@ proc respond*(req: Request, code: HttpCode, content: string, ## Examples ## -------- ## .. code-block::nim + ## import json ## proc handler(req: Request) {.async.} = ## if req.url.path == "/hello-world": ## let msg = %* {"message": "Hello World"}