Did you know ... | Search Documentation: |
Title for pldoc(dir_index) |
This directory provides the SWI-Prolog libraries for accessing and providing HTTP services.
The main client library is library(http/http_open)
, which can open
both HTTP and HTTPS connections and handle all request methods.
The main server libraris are
library(http/thread_httpd)
implements the serverlibrary(http/http_dispatch)
implements binding locations
predicateslibrary(http/http_unix_daemon)
implements integration in various
Unix server managers and in general provides a suitable entry point
for HTTP servers on Unix.library(http/html_write)
implements generating HTMLlibrary(http/http_json)
implements reading and writing JSON documents.
For simplicity, you can use library(http/http_server)
, which
combines the typical HTTP libraries that most servers need. The
idea of a common request handling system and three controlling
libraries is outdated; the threaded server now being the only sensible
controlling library.
This library uses functionality from the ssl
package to support HTTPS,
the sgml
package to read XML/HTML and the clib
package for various
extensions.
ax.pl -- Attribute Exchange library | ||
---|---|---|
graphql.pl -- GraphQL interface | ||
html_head.pl -- Automatic inclusion of CSS and scripts links | ||
html_quasiquotations.pl -- HTML quasi quotations | ||
html_write.pl -- Write HTML text | ||
htmx.pl -- Support htmx.org | ||
http_authenticate.pl -- Authenticate HTTP connections using 401 headers | ||
http_client.pl -- HTTP client library | ||
http_cookie.pl -- HTTP client cookie handling | ||
update_cookies/3 | Update the client cookie database. | |
write_cookies/3 | Emit a cookie header for the current request. | |
cookie_remove_all_clients/0 | Simply logout all clients. | |
cookie_remove_client/1 | Fake user quitting a browser. | |
http_cors.pl -- Enable CORS: Cross-Origin Resource Sharing | ||
http_digest.pl -- HTTP Digest authentication | ||
http_dirindex.pl -- HTTP directory listings | ||
http_dispatch.pl -- Dispatch requests in the HTTP server | ||
http_404/2 | Reply using an "HTTP 404 not found" page. | |
http_current_handler/2 | True if Location is handled by Closure. | |
http_current_handler/3 | Resolve the current handler and options to execute it. | |
http_delete_handler/1 | Delete handler for Spec. | |
http_dispatch/1 | Dispatch a Request using http_handler/3 registrations. | |
http_handler/3 | Register Closure as a handler for HTTP requests. | |
http_link_to_id/3 | HREF is a link on the local server to a handler with given ID, passing the given Parameters. | |
http_location_by_id/2 | True when Location represents the HTTP path to which the handler with identifier ID is bound. | |
http_redirect/3 | Redirect to a new location. | |
http_reload_with_parameters/3 | Create a request on the current handler with replaced search parameters. | |
http_reply_file/3 | Options is a list of. | |
http_request_expansion/2 | Register Goal for expanding the HTTP request handler. | |
http_safe_file/2 | True if FileSpec is considered safe. | |
http_switch_protocol/2 | Send an "HTTP 101 Switching Protocols" reply. | |
http_dyn_workers.pl -- Dynamically schedule HTTP workers. | ||
http_error.pl -- Decorate uncaught HTTP exceptions with stack-trace | ||
http_exception.pl -- Map Prolog exceptions to HTTP errors | ||
http_files.pl -- Serve plain files from a hierarchy | ||
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_load.pl -- Load Prolog code from a web server | ||
prolog_load_file/2 | Hook into load_files/2 that loads http:// and https:// resources directly from the web. | |
http_log.pl -- HTTP Logging module | ||
http_multipart_plugin.pl -- Multipart form-data plugin | ||
http_open.pl -- HTTP client library | ||
disable_encoding_filter/1 | Do not use the Content-encoding as Transfer-encoding encoding for specific values of ContentType. | |
http_close_keep_alive/1 | Close all keep-alive connections matching Address. | |
http_open/3 | Open the data at the HTTP server as a Prolog stream. | |
http_set_authorization/2 | Set user/password to supply with URLs that have URL as prefix. | |
keep_alive/4 | Callback when closing the range stream used to process the content of the reply. | |
map_method/2 | Support additional METHOD keywords. | |
open_hook/6 | Hook implementation that makes open_any/5 support http and https URLs for Mode == read . | |
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_proxy.pl -- Use HTTP network proxies | ||
http_pwp.pl -- Serve PWP pages through the HTTP server | ||
http_redis_plugin.pl -- Hook session management to use Redis | ||
http_server.pl -- HTTP server library | ||
http_server_files.pl -- Serve files needed by modules from the server | ||
http_server_health.pl -- HTTP Server health statistics | ||
http_session.pl -- HTTP Session management | ||
http_close_session/1 | Closes an HTTP session. | |
http_current_session/2 | Enumerate the current sessions and associated data. | |
http_in_session/1 | True if SessionId is an identifier for the current session. | |
http_open_session/2 | Establish a new session. | |
http_session_assert/1 | Versions of assert/1, retract/1 and retractall/1 that associate data with the current HTTP session. | |
http_session_assert/2 | Versions of assert/1, retract/1 and retractall/1 that associate data with an explicit HTTP session. | |
http_session_asserta/1 | Versions of assert/1, retract/1 and retractall/1 that associate data with the current HTTP session. | |
http_session_asserta/2 | Versions of assert/1, retract/1 and retractall/1 that associate data with an explicit HTTP session. | |
http_session_cookie/1 | Generate a random cookie that can be used by a browser to identify the current session. | |
http_session_data/1 | True if Data is associated using http_session_assert/1 to the current HTTP session. | |
http_session_data/2 | Versions of assert/1, retract/1 and retractall/1 that associate data with an explicit HTTP session. | |
http_session_id/1 | True if SessionId is an identifier for the current session. | |
http_session_option/1 | True if Option is a current option of the session system. | |
http_session_retract/1 | Versions of assert/1, retract/1 and retractall/1 that associate data with the current HTTP session. | |
http_session_retract/2 | Versions of assert/1, retract/1 and retractall/1 that associate data with an explicit HTTP session. | |
http_session_retractall/1 | Versions of assert/1, retract/1 and retractall/1 that associate data with the current HTTP session. | |
http_session_retractall/2 | Versions of assert/1, retract/1 and retractall/1 that associate data with an explicit HTTP session. | |
http_set_session/1 | Overrule a setting for the current or specified session. | |
http_set_session/2 | Overrule a setting for the current or specified session. | |
http_set_session_options/1 | Set options for the session library. | |
session_setting/2 | Find setting for SessionID. | |
http_sgml_plugin.pl -- Parse of HTML and XML documents for the HTTP client libs | ||
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 | ||
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 | ||
thread_httpd.pl -- Threaded HTTP server | ||
websocket.pl -- WebSocket support | ||
yadis.pl -- Yadis discovery |