Add #:code option to render-html

This commit is contained in:
Christopher Baines 2019-05-19 22:23:22 +01:00
parent e92e095ee9
commit 2c35331075
1 changed files with 6 additions and 3 deletions

View File

@ -91,9 +91,12 @@
failure))
failure)))
(define* (render-html #:key sxml (extra-headers '()))
(list (append extra-headers
'((content-type . (text/html))))
(define* (render-html #:key sxml (extra-headers '())
(code 200))
(list (build-response
#:code code
#:headers (append extra-headers
'((content-type . (text/html)))))
(lambda (port)
(sxml->html sxml port))))