{ $description "The class of trivial responders, which output the same response for every request. New instances are created by calling " { $link <trivial-responder> } "." } ;
{ $description "Creates a new trivial responder which outputs the same response for every request." } ;
HELP:benchmark?
{ $var-description "If set to a true value, the HTTP server will log the time taken to process each request." } ;
HELP:call-responder
{ $values
{ "path""a sequence of strings" } { "responder""a responder" }
{ "response" response } }
{ $description "Calls a responder." } ;
HELP:call-responder*
{ $values
{ "path""a sequence of strings" } { "responder""a responder" }
{ "response" response } }
{ $contract "Processes an HTTP request and returns a response." }
{ $notes "When this word is called, various dynamic variables are set; see " { $link "http.server.requests" } "." } ;
HELP:development?
{ $var-description "If set to a true value, the HTTP server will call " { $link refresh-all } " on each request, and error pages will contain stack traces." } ;
HELP:main-responder
{ $var-description "The responder which will handle HTTP requests." } ;
HELP:post-request?
{ $values { "?""a boolean" } }
{ $description "Outputs if the current request is a POST request.s" } ;
HELP:responder-nesting
{ $description "A sequence of " { $snippet "{ path responder }" } " pairs." } ;
HELP:http-server
{ $class-description "The class of HTTP servers. New instances are created by calling " { $link <http-server> } "." } ;
HELP:<http-server>
{ $values { "server" http-server } }
{ $description "Creates a new HTTP server with default parameters." } ;
HELP:httpd
{ $values { "port"integer } }
{ $description "Starts an HTTP server on the specified port number." }
{ $notes "For more flexibility, use " { $link <http-server> } " and fill in the tuple slots before calling " { $link start-server } "." } ;
HELP:http-insomniac
{ $description "Starts a thread which rotates the logs and e-mails a summary of HTTP requests every 24 hours. See " { $link "logging.insomniac" } "." } ;
"In particular, writing new responders by hand is rarely necessary, because in most cases it is easier to use " { $vocab-link "furnace.actions" } " instead.";
ARTICLE: "http.server.variables""HTTP server variables"
"The following global variables control the behavior of the HTTP server. Both are off by default."
{ $subsection development? }
{ $subsection benchmark? } ;
ARTICLE: "http.server""HTTP server"
"The " { $vocab-link "http.server" } " vocabulary implements an HTTP and HTTPS server on top of " { $vocab-link "io.servers.connection" } "."
{ $subsection "http.server.responders" }
{ $subsection "http.server.requests" }
"Various types of responders are defined in other vocabularies:"
{ $subsection "http.server.dispatchers" }
{ $subsection "http.server.filters" }
"Useful canned responses:"
{ $subsection "http.server.responses" }
{ $subsection "http.server.redirection" }
"Configuration:"
{ $subsection "http.server.variables" }
{ $subsection "http.server.remapping" }
"Features:"
{ $subsection "http.server.static" }
{ $subsection "http.server.cgi" }
"The " { $vocab-link "furnace" } " framework implements high-level abstractions which make developing web applications much easier than writing responders by hand.";