all repos — wsabi @ 8c294fc8e9a590377dc172be84af6ee585f6f9a2

websocket proxy that sends stats to statsd

src/wsabipkg/httputils.nim (view raw)

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