I am trying to send headers using the asynchttpserver module, this is what the documentation gives me
sendHeaders(req: Request; headers: HttpHeaders)
HttpHeaders documentation shows this:
HttpHeaders = ref object
table*: TableRef[string, seq[string]]
I have now spent an hour trying everything I could think of, but I am sure it should be simple, so maybe someone here can help?
Perhaps like this?
sendHeaders(req, newHttpHeaders([("Content-Type","application/json")]))