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![]() | ||
graphql/4 | Quasi-quotation syntax for embedding GraphQL in Prolog text. | ![]() |
graphql_auth_token_hook/2 | Multifile, dynamic hook. | ![]() |
graphql_document_to_codes/3 | Serialize Document, a Prolog term representing a GraphQL document as obtained from graphql_read_document/3 or the graphql/4 quasi-quotation, and unify Codes with the resulting list of character codes. | ![]() |
graphql_document_to_string/3 | Serialize the GraphQL document Document and unify String with the resulting string. | ![]() |
graphql_execute_document/4 | Send GraphQL document Document to be executed by the GraphQL endpoint at URI. | ![]() |
graphql_read_document/3 | True when Document is a term representing the abstract syntax tree obtained from parsing Source as a GraphQL executable document. | ![]() |
html_head.pl -- Automatic inclusion of CSS and scripts links![]() | ||
html_current_resource/1 | True when About is a currently known resource. | ![]() |
html_insert_resource/3 | Actually include HTML head resources. | ![]() |
html_requires/3 | Include ResourceOrList and all dependencies derived from it and add them to the HTML head using html_post/2. | ![]() |
html_resource/2 | Register an HTML head resource. | ![]() |
mime_include/4 | Hook called to include a link to an HTML resource of type Mime into the HTML head. | ![]() |
html_quasiquotations.pl -- HTML quasi quotations![]() | ||
html_write.pl -- Write HTML text![]() | ||
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![]() | ||
post_data_hook/3 | Hook to extend the datatypes supported by the post(Data) option of http_open/3. | ![]() |
http_convert_data/4 | Multi-file hook to convert a HTTP payload according to the Content-Type header. | ![]() |
http_delete/3 | Execute a DELETE method on the server. | ![]() |
http_disconnect/1 | Close down some connections. | ![]() |
http_get/3 | Get data from a URL server and convert it to a suitable Prolog representation based on the Content-Type header and plugins. | ![]() |
http_patch/4 | Issue an HTTP PATCH request. | ![]() |
http_post/4 | Issue an HTTP POST request. | ![]() |
http_put/4 | Issue an HTTP PUT request. | ![]() |
http_read_data/3 | Read data from an HTTP connection and convert it according to the supplied to(Format) option or based on the Content-type in the Request. | ![]() |
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![]() | ||
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_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_reply_from_files/3 | HTTP handler that serves files from the directory Dir. | ![]() |
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![]() | ||
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![]() | ||
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. | ![]() |
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![]() | ||
openid_associate/3 | Calls openid_associate/4 as. | ![]() |
openid_associate/4 | Associate with an open-id server. | ![]() |
openid_authenticate/4 | Succeeds if Request comes from the OpenID server and confirms that User is a verified OpenID user. | ![]() |
openid_current_host/3 | Find current location of the server. | ![]() |
openid_current_url/2 | Find the public URL for Request that we can make available to our identity provider. | ![]() |
openid_grant/1 | Handle the reply from checkid_setup_server/3. | ![]() |
openid_hook/1 | Call hook on the OpenID management library. | ![]() |
openid_logged_in/1 | True if session is associated with OpenID. | ![]() |
openid_login/1 | Associate the current HTTP session with OpenID. | ![]() |
openid_login_form/4 | Create the OpenID form. | ![]() |
openid_logout/1 | Remove the association of the current session with any OpenID. | ![]() |
openid_server/2 | Realise the OpenID server. | ![]() |
openid_server/3 | True if OpenIDLogin is the typed id for OpenID verified by Server. | ![]() |
openid_user/3 | True if OpenID is a validated OpenID associated with the current session. | ![]() |
openid_verify/2 | Handle the initial login form presented to the user by the relying party (consumer). | ![]() |
ssl_verify/5 | Accept all certificates. | ![]() |
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_session.pl -- HTTP Session management![]() | ||
http_sgml_plugin.pl -- Parse of HTML and XML documents for the HTTP client libs![]() | ||
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_token/3 | Matches and classifies the next JavaScript token. | ![]() |
js_write.pl -- Utilities for including JavaScript![]() | ||
javascript/4 | Quasi quotation parser for JavaScript that allows for embedding Prolog variables to substitude identifiers in the JavaScript snippet. | ![]() |
js_arg/3 | Same as js_expression//1, but fails if Expression is invalid, where js_expression//1 raises an error. | ![]() |
js_arg_list/3 | Write javascript (function) arguments. | ![]() |
js_call/3 | Emit a call to a Javascript function. | ![]() |
js_expression/3 | Emit a single JSON argument. | ![]() |
js_new/4 | Emit a call to a Javascript object declaration. | ![]() |
js_script/3 | Generate a JavaScript script element with the given content. | ![]() |
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_bool_to_json/2 | JSON is the JSON boolean for Prolog. | ![]() |
prolog_to_json/2 | Translate a Prolog application Term into a JSON object term. | ![]() |
mimepack.pl -- Create a MIME message![]() | ||
mime_pack/3 | Pack a number of inputs into a MIME package using a specified or generated boundary. | ![]() |
mimetype.pl -- Determine mime-type for a file![]() | ||
charset/3 | Hook that determines the Charset for File that has media type MediaType. | |
mime_extension/2 | Hook that is called by file_mime_type/2 before the default table is examined. | |
file_content_type/2 | True if File should be served using ContentType: ContentType. | ![]() |
file_content_type/3 | True if File should be served using ContentType: ContentType. | ![]() |
file_mime_type/2 | True when MimeType is the mime-type to be used for sending FileName. | ![]() |
term_html.pl -- Represent Prolog terms as HTML![]() | ||
thread_httpd.pl -- Threaded HTTP server![]() | ||
websocket.pl -- WebSocket support![]() | ||
yadis.pl -- Yadis discovery![]() | ||
ssl_verify/5 | Accept all certificates. | ![]() |
xrds_dom/2 | True when XRDS_DOM is a parsed XML document for the given resource. | ![]() |
xrds_location/2 | Discover the location of the XRDS document from the given Id. | ![]() |