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![]() | ||
http_authenticate.pl -- Authenticate HTTP connections using 401 headers![]() | ||
http_client.pl -- HTTP client library![]() | ||
http_cors.pl -- Enable CORS: Cross-Origin Resource Sharing![]() | ||
http_dirindex.pl -- HTTP directory listings![]() | ||
| mime_type_icon/2 | Multi-file hook predicate that can be used to associate icons to files listed by http_reply_dirindex/3. | ![]() |
| directory_index/4 | Show index for a directory. | ![]() |
| http_reply_dirindex/3 | Provide a directory listing for Request, assuming it is an index for the physical directrory Dir. | ![]() |
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![]() | ||
| post_data_hook/3 | Hook implementation that allows http_post_data/3 posting JSON objects using one of the forms below. | ![]() |
| http_convert_data/4 | Hook implementation that supports reading JSON documents. | ![]() |
| http_read_json/2 | Extract JSON data posted to this HTTP request. | ![]() |
| http_read_json/3 | Extract JSON data posted to this HTTP request. | ![]() |
| http_read_json_dict/2 | Similar to http_read_json/2,3, but by default uses the version 7 extended datatypes. | ![]() |
| http_read_json_dict/3 | Similar to http_read_json/2,3, but by default uses the version 7 extended datatypes. | ![]() |
| json_type/1 | True if MediaType is a JSON media type. | ![]() |
| reply_json/1 | Formulate a JSON HTTP reply. | ![]() |
| reply_json/2 | Formulate a JSON HTTP reply. | ![]() |
| reply_json_dict/1 | As reply_json/1 and reply_json/2, but assumes the new dict based data representation. | ![]() |
| reply_json_dict/2 | As reply_json/1 and reply_json/2, but assumes the new dict based data representation. | ![]() |
http_log.pl -- HTTP Logging module![]() | ||
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![]() | ||
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![]() | ||
| current_json_object/3 | Multifile predicate computed from the json_object/1 declarations. | ![]() |
| json_object/1 | Declare a JSON object. | ![]() |
| json_to_prolog/2 | Translate a JSON term into an application term. | ![]() |
| prolog_to_json/2 | Translate a Prolog application Term into a JSON object term. | ![]() |
mimepack.pl -- Create a MIME message![]() | ||
mimetype.pl -- Determine mime-type for a file![]() | ||
term_html.pl -- Represent Prolog terms as HTML![]() | ||
thread_httpd.pl -- Threaded HTTP server![]() | ||
websocket.pl -- WebSocket support![]() | ||
yadis.pl -- Yadis discovery![]() | ||
