spork/http/send-response
spork
function
/usr/local/lib/janet/spork/http.janet on line 319, column 1
(send-response conn response &opt buf)
Send an HTTP response over a connection. Will automatically use
chunked encoding if body is not a byte sequence. `response` should
be a table with the following keys:
* `:headers` - optional headers to write
* `:status` - integer status code to write
* `:body` - optional byte sequence or iterable (for chunked body)
for returning contents. The iterable can be lazy, i.e. for
streaming data.