Next: Running server, Previous: Registering handler of HTTP methods, Up: Basic in GNU Artanis [Contents]
(response-emit body #:status 200 #:headers '() #:mtime (current-time))
body is the response body, it can be bytevector or literal string (in HTML).
#:status is HTTP status, 200 in default, which means OK.
#:headers let you specify customized HTTP headers. The headers must follow certain format, you have to read about the Response Headers.
#:mtime specifies the modify time in the response. GNU Artanis will generate it for you if you just ignore it.
(emit-response-with-file filename [headers <- '()])
filename is the filename to be sent as a response.
[headers] is the customized HTTP headers.