Dear All,

I'm relatively new in Nim, came from Python. Developing my own little resource 
monitoring project and chose raw **httpbeast** as a platform for REST API due 
to its simpleness and performance.

I'm stuck with the way on how to send headers from server to client. To be 
honest, this is not important for the project itself, but unfortunately it's 
not documented. Maybe it will be useful for other beginners.

In **httpbeast.nim** :
    
    
    proc send*(req: Request, code: HttpCode, body: string, headers="") =
      {proc body}
    
    Run

No type mentioned for headers, and also
    
    
    let myheaders = @["{'MyHeader:test'}"]
    req.send("body string", headers=myheaders)
    
    Run

in httpbeast main app onRequest proc won't compile, as well as just assign an 
regular string to headers argument.

There are 3 pairs of arguments httpbeast sends to client by default : 
_Content-Length, Server and Date_

Thanks in advance

Reply via email to