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 libraries 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_decl.pl -- HTML emitter analysis and IDE support![]() | ||
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![]() | ||
htmx_oob/4 | Emit an htmx out-of-band element. | ![]() |
reply_htmx/1 | Reply a plain HTML element as opposed to a complete HTML page as created using reply_html_page/2,3. | ![]() |
reply_htmx/2 | Reply a plain HTML element as opposed to a complete HTML page as created using reply_html_page/2,3. | ![]() |
http_authenticate.pl![]() | ||
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_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![]() | ||
authenticate/3 | Plugin for library(http_dispatch) to perform basic HTTP authentication. | ![]() |
authenticate_client/2 | This hooks is called by http_open/3 with the following Action value:. | ![]() |
http_digest_challenge/4 | Generate the content for a 401 WWW-Authenticate: Digest header field. | ![]() |
http_digest_password_hash/4 | Compute the password hash for the HTTP password file. | ![]() |
http_digest_response/5 | Formulate a reply to a digest authentication request. | ![]() |
http_parse_digest_challenge/2 | Parse the value of an HTTP WWW-Authenticate header into a list of Name(Value) terms. | ![]() |
http_dirindex.pl -- HTTP directory listings![]() | ||
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_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![]() | ||
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![]() | ||
try_proxy/4 | Connection is via an HTTP proxy for socket: Use HTTP CONNECT. | ![]() |
http_pwp.pl -- Serve PWP pages through the HTTP server![]() | ||
pwp_handler/2 | Handle PWP files. | ![]() |
reply_pwp_page/3 | Reply a PWP file. | ![]() |
http_redis_plugin.pl -- Hook session management to use Redis![]() | ||
http_server.pl -- HTTP server library![]() | ||
http_server/1 | Create an HTTP server using http_dispatch/1 for handling requests. | ![]() |
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_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![]() | ||
current_hub/2 | True when there exists a hub Hub with Name. | ![]() |
hub_add/3 | Add a WebSocket to the hub. | ![]() |
hub_broadcast/2 | Send Message to all websockets associated with Hub for which call(Condition, Id) succeeds. | ![]() |
hub_broadcast/3 | Send Message to all websockets associated with Hub for which call(Condition, Id) succeeds. | ![]() |
hub_create/3 | Create a new hub. | ![]() |
hub_member/2 | True when Id is a member of the hub HubName. | ![]() |
hub_send/2 | Send message to the indicated ClientId. | ![]() |
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_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![]() | ||
term_html.pl -- Represent Prolog terms as HTML![]() | ||
thread_httpd.pl![]() | ||
schedule_workers/1 | Hook called if a new connection or a keep-alive connection cannot be scheduled immediately to a worker. | ![]() |
http_add_worker/2 | Add a new worker to the HTTP server for port Port. | ![]() |
http_close_connection/1 | Close connection associated to Request. | ![]() |
http_current_server/2 | True if Goal is the goal of a server at Port. | ![]() |
http_current_worker/2 | True if ThreadID is the identifier of a Prolog thread serving Port. | ![]() |
http_enough_workers/3 | Check that we have enough workers in our queue. | ![]() |
http_requeue/1 | Re-queue a connection to the worker pool. | ![]() |
http_server/2 | Create a server at Port that calls Goal for each parsed request. | ![]() |
http_server_property/2 | True if Property is a property of the HTTP server running at Port. | ![]() |
http_spawn/2 | Continue this connection on a new thread. | ![]() |
http_stop_server/2 | Stop the indicated HTTP server gracefully. | ![]() |
http_workers/2 | Query or set the number of workers for the server at this port. | ![]() |
message_level/2 | Determine the message stream used for exceptions that may occur during server_loop/5. | ![]() |
websocket.pl -- WebSocket support![]() | ||
yadis.pl![]() | ||
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. | ![]() |