Enable passing extra headers for JSON responses
Mostly to enable passing the cache-control header.
This commit is contained in:
parent
03faff5da0
commit
0ca5748c0f
|
@ -97,8 +97,9 @@
|
|||
(lambda (port)
|
||||
(sxml->html sxml port))))
|
||||
|
||||
(define (render-json json)
|
||||
(list '((content-type . (application/json)))
|
||||
(define* (render-json json #:key (extra-headers '()))
|
||||
(list (append extra-headers
|
||||
'((content-type . (application/json))))
|
||||
(lambda (port)
|
||||
(scm->json json port))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue