src/wsabi/httputils.nim (view raw)
1 2 3 4 5 6 7 8 9 10
import asynchttpserver, asyncdispatch proc makeResponse*( req: Request, code: HttpCode, content: string ) {.async.} = await req.respond( code, content, newHttpHeaders([("Content-Type", "application/json")]) )