4 Plain text
Mirrors contains a few procedures and utilities for sending plain text responses:
(require (planet untyped/mirrors/plain/plain)) |
| ||||||||||||||||||||||||||||||||||||||||||
code : integer? = 200 | ||||||||||||||||||||||||||||||||||||||||||
message : string? = "OK" | ||||||||||||||||||||||||||||||||||||||||||
seconds : integer = (current-seconds) | ||||||||||||||||||||||||||||||||||||||||||
mime-type : (U string? bytes?) = #"text/plain; charset=utf-8" | ||||||||||||||||||||||||||||||||||||||||||
headers : (alistof symbol? string?) = no-cache-http-headers | ||||||||||||||||||||||||||||||||||||||||||
content : (listof string?) |
A keyword wrapper for make-response/full with sensible defaults for most purposes.
| ||||||||||||||||||||||||
→ response | ||||||||||||||||||||||||
code : integer? = 200 | ||||||||||||||||||||||||
message : string? = "OK" | ||||||||||||||||||||||||
seconds : integer? = (current-seconds) | ||||||||||||||||||||||||
mime-type : (U string? bytes?) = #"text/plain; charset=utf-8" | ||||||||||||||||||||||||
headers : (alistof symbol? string?) = no-cache-http-headers | ||||||||||||||||||||||||
content : (((listof (U bytes? string?)) -> any) -> any) |
A keyword wrapper for make-response/incremental with sensible defaults for most purposes.
| ||||||||||||||||||||||||||||
code : integer? = 302 | ||||||||||||||||||||||||||||
message : string? = "Moved temporarily" | ||||||||||||||||||||||||||||
headers : (alistof symbol? string?) = no-cache-http-headers | ||||||||||||||||||||||||||||
url : (U string? url?) |
Creates a response that redirects the user to the specified url. A Location header is constructed from the URL; members of headers of the same name are removed.
The default HTTP headers generated by make-html-response, make-js-response, make-plain-response and others, designed to prevent the browser caching dynamically generated pages:
| |||||
|