http_help.pl -- Explore the running HTTP server
This module is part of the SWI-Prolog web-developent infrastructure. It
documents the HTTP server using the reflexive capabilities of Prolog and
the server infrastructure. Self-documentation is enabled by loading this
module. The entry-point of this module is located at the HTTP location
root(help/http)
, using the handler-identifier http_help
.
In addition, this module provides the component page_documentation_link//1, which shows a small book linking from the displayed page to its documentation.
- page_documentation_link(+Request)// is det
- Show a link to the documentation of the current page.
- http_help(Request)[private]
- HTTP handler to explore the Prolog HTTP server
- help_page(Options)//[private]
- Emit the tree and #http-help for holding the description. We
need to include the requirements for PlDoc here as the scripts
are not loaded through the innerHTML method.
Options:
- location(Location)
- Initially open Location.
- script(+Options)// is det[private]
- Emit JavScript code that gets the help for the HTTP location associated with node and displays this information in #http-help.
- help_on_handler(+Request)[private]
- Describe the HTTP handler for the given location.
- status(+How)//[private]
- Emit HTTP code and comment for status.
- predicate_help(+Request, +Closure)// is det[private]
- Provide the help-page of the implementing predicate.
- edit_options(+Request, -Options) is det[private]
- Assume we can show and edit option if we are allowed to access
the HTTP location
pldoc(edit)
. - dispatch_options(+Options, +Path)// is det[private]
- Describe the dispatching options
- parameter_table(+Params)// is det[private]
- Provide help on the parameters
- param_type(+Options)// is det[private]
- Emit a description of the type in HTML.
- breaking_bar// is det[private]
- Emits | followed by a zero-width white-space that allows the browser to insert a linebreak here.
- type_term(-Term) is nondet[private]
- Enumerate the option-terms that are interpreted as types.
- extracted_parameters(+Closure, -Declarations)[private]
- Return a completely qualified list of parameters that are retrieved by calling Closure.
- extend_closure(:In, +Extra, -Out) is det[private]
- Extend a possibly qualified closure with arguments from Extra.
- calls(:Goal, +MaxDepth, -Called) is det[private]
- Called is the list of goals called by Goal obtained by unfolding the call-tree upto the given MaxDepth.
- bind_vars(+Key, +Pairs) is det[private]
- Pairs contains the variable bindings after scanning the alternative computation paths. Key are the initial variables.
- evaluate_now(:Goal) is semidet[private]
- If
true
, call Goal and propagate bindings that it produces instead of unfolding its call-tree. This was introduced to deal with extracted_parameters/2, which dynamically constructs option-lists for http_parameters/3. - evaluate(:Goal) is semidet[multifile]
- Multifile hook to extend the goals that are evaluated by evaluate_now/1.
- autocomplete(+HandlerID, +Options)// is det[private]
- Insert a YUI autocomplete widget that obtains its alternatives
from HandlerID. The following Options are supported:
- width(+Width)
- Specify the width of the box. Width must satisfy the CSS length syntax.
- query_delay(+Seconds)
- Wait until no more keys are typed for Seconds before sending the query to the server.
- ac_location(+Request)[private]
- HTTP handler to for autocompletion on HTTP handlers.