7.5 Emit a Response

(response-emit body #:status 200 #:headers '() #:mtime (current-time))

body is the response body, it can be a bytevector or literal string (in HTML).

#:status is the HTTP status, 200 in default, which means OK.

#:headers lets you specify custom HTTP headers. The headers must follow a certain format. Please read Response Headers for details.

#:mtime specifies the modified time in the response. GNU Artanis will generate it for you when not defined.

(emit-response-with-file filename [headers <- '()])

filename is the filename to be sent as a response.

[headers] is the custom HTTP headers.