Explorar o código

Set Content-Type as application/json for the Jester benchmark.

Dominik Picheta %!s(int64=12) %!d(string=hai) anos
pai
achega
09727da533
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      jester/hello.nim

+ 1 - 1
jester/hello.nim

@@ -2,7 +2,7 @@ import jester, strtabs, json, asyncio, sockets
 
 get "/json":
   var obj = %{"message": %"Hello, World!"}
-  resp($obj)
+  resp($obj, "application/json")
 
 var disp = newDispatcher()
 disp.register(port = TPort(9000), http=false)