import asynchttpserver, asyncdispatch proc makeResponse*( req: Request, code: HttpCode, content: string ) {.async.} = await req.respond( code, content, newHttpHeaders([("Content-Type", "application/json")]) )