{ $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." } ;
{ $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" } "." } ;
{ $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)." } ;
HELP:param
{ $values
{ "name"string }
{ "value"string }
}
{ $description "Outputs the value of a query parameter (if the current request is a GET or HEAD request) or a POST parameter (if the current request is a POST request)." }
{ $notes "Instead of using this word, it is better to use " { $vocab-link "furnace.actions" } " and the associated validation machinery, which allows you to access values using " { $link "html.forms.values" } " words." } ;
HELP:params
{ $var-description "A variable holding an assoc of query parameters (if the current request is a GET or HEAD request) or POST parameters (if the current request is a POST request)." }
{ $notes "Instead of using this word, it is better to use " { $vocab-link "furnace.actions" } " and the associated validation machinery, which allows you to access values using " { $link "html.forms.values" } " words." } ;
"Responders process requests and output " { $link "http.responses" } ". To implement a responder, define a new class and implement a method on the following generic word:"
"The " { $vocab-link "furnace" } " framework implements high-level abstractions which make developing web applications much easier than writing responders by hand.";