(in-package #:modlisp)
+(defun format->string (fmt)
+ (case fmt
+ (:html "text/html")
+ (:xml "text/xml")
+ (:text "text/plain")
+ (otherwise fmt)))
+
(defun format-string (fmt headers)
`(("Content-Type" .
- ,(case fmt
- (:html "text/html")
- (:xml "text/xml")
- (:text "text/plain")
- (otherwise fmt)))
+ ,(format->string fmt))
. ,headers))
(defmacro write-response ((&key headers len (status "200 OK")) &body body)