Handbook
Glossary
<redirect> ( url -- response )
Furnace framework
ยป
Furnace redirection support
Next:
<redirect-responder> ( url -- responder )
Vocabulary
furnace
.
redirection
Inputs
url
an
url
Outputs
response
a
response
Word description
Creates a response which redirects the client to the given URL.
Definition
USING:
accessors
combinators
furnace.utilities
http
http.server.redirection
http.server.responses
kernel
namespaces
;
IN:
furnace.redirection
:
<redirect>
( url -- response )
adjust-redirect-url
request
get
method>>
{
{
"GET"
[
<temporary-redirect>
]
}
{
"HEAD"
[
<temporary-redirect>
]
}
{
"POST"
[
<permanent-redirect>
]
}
{
"DELETE"
[
<303>
<custom-redirect>
]
}
[
2drop
<405>
]
}
case
;