SWI-Prolog HTTP support library
This directory provides the SWI-Prolog libraries for accessing and providing HTTP services. The client libraries come in two forms:
- The lightweight http_open.pl opens an HTTP location as a stream
- The more full-blown http_client.pl performs arbitrary HTTP requests and, depending on loaded plugins, transforms the data in a Prolog-friendly format.
The primary server-library is thread_httpd.pl, providing full-blown scalable embedded HTTP server.
Further reading
- ../../packages/http.pdf
- ../../packages/examples/http contains some demos.
- http://www.swi-prolog.org/pldoc/package/http.html
Prolog files
ax.pl -- Attribute Exchange library![]() | ||
|---|---|---|
html_head.pl -- Automatic inclusion of CSS and scripts links![]() | ||
html_quasiquotations.pl -- HTML quasi quotations![]() | ||
html_write.pl -- Write HTML text![]() | ||
| html/3 | Generate HTML from Content. | ![]() |
| html_begin/3 | For html_begin//1, Env is a term Env(Attributes); for html_end//1 it is the plain environment name. | ![]() |
| html_current_option/1 | True if Option is an active option for the HTML generator. | ![]() |
| html_end/3 | For html_begin//1, Env is a term Env(Attributes); for html_end//1 it is the plain environment name. | ![]() |
| html_meta/1 | This directive can be used to declare that an HTML rendering rule takes HTML content as argument. | ![]() |
| html_post/4 | Reposition HTML to the receiving Id. | ![]() |
| html_print_length/2 | Determine the content length of a token list produced using html//1. | ![]() |
| html_quoted/3 | Quote the value for normal (CDATA) text. | ![]() |
| html_quoted_attribute/3 | Quote the value according to the rules for tag-attributes included in double-quotes. | ![]() |
| html_receive/3 | Receive posted HTML tokens. | ![]() |
| html_receive/4 | This extended version of html_receive//1 causes Handler to be called to process all messages posted to the channal at the time output is generated. | ![]() |
| html_root_attribute/4 | Add an attribute to the HTML root element of the page. | ![]() |
| html_set_options/1 | Set options for the HTML output. | ![]() |
| layout/3 | Define required newlines before and after tags. | ![]() |
| page/3 | Generate a page including the HTML <!DOCTYPE> header. | ![]() |
| page/4 | Generate a page including the HTML <!DOCTYPE> header. | ![]() |
| print_html/1 | Print list of atoms and layout instructions. | ![]() |
| print_html/2 | Print list of atoms and layout instructions. | ![]() |
| reply_html_page/2 | Provide the complete reply as required by http_wrapper.pl for a page constructed from Head and Body. | ![]() |
| reply_html_page/3 | Provide the complete reply as required by http_wrapper.pl for a page constructed from Head and Body. | ![]() |
| xhtml_ns/4 | Demand an xmlns:id=Value in the outer html tag. | ![]() |
http_authenticate.pl -- Authenticate HTTP connections using 401 headers![]() | ||
| http_authenticate/3 | True if Request contains the information to continue according to Type. | ![]() |
| http_authorization_data/2 | Decode the HTTP Authorization header. | ![]() |
| http_current_user/3 | True when User is present in the htpasswd file File and Fields provides the additional fields. | ![]() |
| http_read_passwd_file/2 | Read a password file. | ![]() |
| http_write_passwd_file/2 | Write password data Data to File. | ![]() |
| authenticate/3 | Plugin for library(http_dispatch) to perform basic HTTP authentication. | ![]() |
http_client.pl -- HTTP client library![]() | ||
http_cors.pl -- Enable CORS: Cross-Origin Resource Sharing![]() | ||
http_dirindex.pl -- HTTP directory listings![]() | ||
http_dispatch.pl -- Dispatch requests in the HTTP server![]() | ||
http_error.pl -- Decorate uncaught HTTP exceptions with stack-trace![]() | ||
http_exception.pl -- Map Prolog exceptions to HTTP errors![]() | ||
http_header.pl -- Handling HTTP headers![]() | ||
http_hook.pl -- HTTP library hooks![]() | ||
http_host.pl -- Obtain public server location![]() | ||
http_json.pl -- HTTP JSON Plugin module![]() | ||
http_log.pl -- HTTP Logging module![]() | ||
| http_log/2 | Write message from Format and Args to log-stream. | ![]() |
| http_log_close/1 | If there is a currently open HTTP logfile, close it after adding a term server(Reason, Time). | ![]() |
| http_log_stream/1 | True when Stream is a stream to the opened HTTP log file. | ![]() |
| http_logrotate/1 | Rotate the available log files. | ![]() |
| http_schedule_logrotate/2 | Schedule log rotation based on maintenance broadcasts. | ![]() |
| nolog/1 | Multifile predicate that can be defined to hide request parameters from the request logfile. | ![]() |
| nolog_post_content_type/1 | Multifile hook called with the Content-type header. | ![]() |
| password_field/1 | Multifile predicate that can be defined to hide passwords from the logfile. | ![]() |
| post_data_encoded/2 | Encode the POST body for inclusion into the HTTP log file. | ![]() |
http_multipart_plugin.pl -- Multipart form-data plugin![]() | ||
http_open.pl -- HTTP client library![]() | ||
http_openid.pl -- OpenID consumer and server library![]() | ||
http_parameters.pl -- Extract parameters (GET and POST) from HTTP requests![]() | ||
http_path.pl -- Abstract specification of HTTP server locations![]() | ||
http_server_files.pl -- Serve files needed by modules from the server![]() | ||
| serve_files_in_directory/2 | Serve files from the directory Alias from the path-info from Request. | ![]() |
http_session.pl -- HTTP Session management![]() | ||
http_ssl_plugin.pl -- SSL plugin for HTTP libraries![]() | ||
http_stream.pl -- HTTP Streams![]() | ||
http_unix_daemon.pl -- Run SWI-Prolog HTTP server as a Unix system daemon![]() | ||
http_wrapper.pl -- Server processing of an HTTP request![]() | ||
hub.pl -- Manage a hub for websockets![]() | ||
jquery.pl -- Provide JQuery![]() | ||
js_grammar.pl -- JavaScript grammar![]() | ||
js_write.pl -- Utilities for including JavaScript![]() | ||
json.pl -- Reading and writing JSON serialization![]() | ||
json_convert.pl -- Convert between JSON terms and Prolog application terms![]() | ||
mimepack.pl -- Create a MIME message![]() | ||
mimetype.pl -- Determine mime-type for a file![]() | ||
term_html.pl -- Represent Prolog terms as HTML![]() | ||
| blob_rendering/5 | Hook to render blob atoms as HTML. | ![]() |
| term/4 | Render a Prolog term as a structured HTML tree. | ![]() |
thread_httpd.pl -- Threaded HTTP server![]() | ||
websocket.pl -- WebSocket support![]() | ||
yadis.pl -- Yadis discovery![]() | ||
