9.0
top
← prev up next →

response-extπŸ”— i

junker

Extended HTTP response functions for Racket Web Server

procedure

( response/make content
[ #:codecode
#:messagemessage
#:secondsseconds
#:mime-typemime-type
#:headersheaders])response?
content:string?
code:number? =200
message:bytes? =#"Okay"
mime-type:(or/cbytes? #f)=TEXT/HTML-MIME-TYPE
headers:(listofheader? )='()
returns response with string content

procedure

( response/not-found [ content
#:headersheaders])response?
content:string? ="Page not found"
headers:(listofheader? )='()
returns response with 404 code

procedure

( response/file file[mime])response?

returns response with file content

procedure

( response/json json)response?

json:jsexpr?
returns response with JSON

procedure

[ permanent
#:headersheaders])response?
url:non-empty-string?
permanent:boolean? =#f
headers:(listofheader? )='()
returns response with redirect

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /