Handbook
Glossary
request-params ( request -- assoc )
Furnace framework
»
HTTP server
»
HTTP request variables
Prev:
set-param ( value name -- )
Vocabulary
http
.
server
Inputs
request
a
request
Outputs
assoc
an
assoc
Word description
Outputs the query parameters (if the current request is a GET or HEAD request) or the POST parameters (if the current request is a POST request).
Definition
USING:
accessors
combinators
kernel
;
IN:
http.server
:
request-params
( request -- assoc )
dup
method>>
{
{
"GET"
[
url>>
query>>
]
}
{
"HEAD"
[
url>>
query>>
]
}
{
"OPTIONS"
[
url>>
query>>
]
}
{
"DELETE"
[
url>>
query>>
]
}
{
"POST"
[
post-data>>
params>>
]
}
{
"PATCH"
[
post-data>>
params>>
]
}
{
"PUT"
[
post-data>>
params>>
]
}
[
2drop
H{
}
clone
]
}
case
;