Handbook
Glossary
<trivial-response> ( code message -- response )
Furnace framework
»
HTTP server
»
Canned HTTP responses
Prev:
<404> ( -- response )
Vocabulary
http
.
server
.
responses
Inputs
code
an
integer
message
a
string
Outputs
response
a
response
Word description
Creates an HTTP error response.
Examples
USE: http.server.responses 415 "Unsupported Media Type" <trivial-response>
Definition
USING:
accessors
io.streams.string
kernel
;
IN:
http.server.responses
:
<trivial-response>
( code message -- response )
2dup
[
trivial-response-body
]
with-string-writer
<html-content>
swap
>>message
swap
>>code
;