Enable passing extra headers for JSON responses
Mostly to enable passing the cache-control header.
This commit is contained in:
parent
03faff5da0
commit
0ca5748c0f
1 changed files with 3 additions and 2 deletions
|
|
@ -97,8 +97,9 @@
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
(sxml->html sxml port))))
|
(sxml->html sxml port))))
|
||||||
|
|
||||||
(define (render-json json)
|
(define* (render-json json #:key (extra-headers '()))
|
||||||
(list '((content-type . (application/json)))
|
(list (append extra-headers
|
||||||
|
'((content-type . (application/json))))
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
(scm->json json port))))
|
(scm->json json port))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue