Skip to content

Commit

Permalink
add response/xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoé Martin committed Feb 8, 2022
1 parent 2d9d571 commit d484efe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web-galaxy-lib/web-galaxy/response.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
redirect/see-other
redirect/cookie
response/page
response/xml
response/raw
response/file
response/json
Expand Down Expand Up @@ -61,6 +62,12 @@
#:preamble #"<!DOCTYPE html>"
content))

(define (response/xml content)
(response/xexpr
#:preamble #"<?xml version=\"1.0\" encoding=\"utf-8\"?>"
#:mime-type #"text/xml; charset=utf-8"
content))

(define (response/raw #:code [code 200]
#:message [message #"OK"]
#:mimetype [mimetype TEXT/HTML-MIME-TYPE]
Expand Down

0 comments on commit d484efe

Please sign in to comment.