Handbook
Glossary
parse-content ( request content-type -- post-data )
Vocabulary
http
.
server
.
requests
Inputs
request
an
object
content-type
an
object
Outputs
post-data
an
object
Definition
USING:
accessors
combinators
http
io
kernel
urls.encoding
;
IN:
http.server.requests
:
parse-content
( request content-type -- post-data )
dup
<post-data>
-rot
over
parse-content-length-safe
swap
{
{
"multipart/form-data"
[
read-multipart-data
>>params
]
}
{
"application/x-www-form-urlencoded"
[
nip
read
query>assoc
>>params
]
}
[
drop
nip
read
>>data
]
}
case
;