File tree 9 files changed +42
-3
lines changed
9 files changed +42
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ both HTTP and HTTPS connections and handle all request methods.
10
10
11
11
## Server library
12
12
13
- The main server libarys are
13
+ The main server libraris are
14
14
15
15
- ` library(http/thread_httpd) ` implements the server
16
16
- ` library(http/http_dispatch) ` implements binding locations
@@ -21,6 +21,12 @@ The main server libarys are
21
21
- ` library(http/html_write) ` implements generating HTML
22
22
- ` library(http/http_json) ` implements reading and writing JSON documents.
23
23
24
+ For simplicity, you can use ` library(http/http_server) ` , which
25
+ combines the typical HTTP libraries that most servers need. The
26
+ idea of a common request handling system and three controlling
27
+ libraries is outdated; the threaded server now being the only sensible
28
+ controlling library.
29
+
24
30
# Requirements
25
31
26
32
This library uses functionality from the ` ssl ` package to support HTTPS,
Original file line number Diff line number Diff line change 101
101
102
102
/* * <module> Write HTML text
103
103
104
+ Most code doesn't need to use this directly; instead use
105
+ library(http/http_server), which combines this library with the
106
+ typical HTTP libraries that most servers need.
107
+
104
108
The purpose of this library is to simplify writing HTML pages. Of
105
109
course, it is possible to use format/3 to write to the HTML stream
106
110
directly, but this is generally not very satisfactory:
Original file line number Diff line number Diff line change 76
76
77
77
/* * <module> Dispatch requests in the HTTP server
78
78
79
+ Most code doesn't need to use this directly; instead use
80
+ library(http/http_server), which combines this library with the
81
+ typical HTTP libraries that most servers need.
82
+
79
83
This module can be placed between http_wrapper.pl and the application
80
84
code to associate HTTP _locations_ to predicates that serve the pages.
81
85
In addition, it associates parameters with locations that deal with
Original file line number Diff line number Diff line change 50
50
51
51
/* * <module> Dynamically schedule HTTP workers.
52
52
53
+ Most code doesn't need to use this directly; instead use
54
+ library(http/http_server), which combines this library with the
55
+ typical HTTP libraries that most servers need.
56
+
53
57
This module defines hooks into the HTTP framework to dynamically
54
58
schedule worker threads. Dynamic scheduling relieves us from finding a
55
59
good value for the size of the HTTP worker pool.
Original file line number Diff line number Diff line change 80
80
81
81
/* * <module> HTTP JSON Plugin module
82
82
83
+ Most code doesn't need to use this directly; instead use
84
+ library(http/http_server), which combines this library with the
85
+ typical HTTP libraries that most servers need.
86
+
83
87
This module adds hooks to several parts of the HTTP libraries, making
84
88
them JSON-aware. Notably:
85
89
Original file line number Diff line number Diff line change 59
59
60
60
/* * <module> Extract parameters (GET and POST) from HTTP requests
61
61
62
+ Most code doesn't need to use this directly; instead use
63
+ library(http/http_server), which combines this library with the
64
+ typical HTTP libraries that most servers need.
65
+
62
66
This module is used to extract the value of GET or POST parameters from
63
67
an HTTP request. The typical usage is e.g.,
64
68
Original file line number Diff line number Diff line change 87
87
88
88
/* * <module> HTTP server library
89
89
90
- This library combines the core server functionality provided by several
91
- libraries that are needed by almost any web server.
90
+ This library combines the core server functionality provided by
91
+ several libraries that are needed by almost any web server. It exports
92
+ the commonly used predicates from library(http/thread_httpd),
93
+ library(http/http_dispatch), library(http/http_wrapper),
94
+ library(http/http_parameters), library(http/html_write),
95
+ library(http/http_json), and library(http/http_dyn_workers).
96
+
92
97
*/
93
98
94
99
%! http_server(+Options) is det.
Original file line number Diff line number Diff line change 57
57
58
58
/* * <module> Server processing of an HTTP request
59
59
60
+ Most code doesn't need to use this directly; instead use
61
+ library(http/http_server), which combines this library with the
62
+ typical HTTP libraries that most servers need.
63
+
60
64
This library provides the core of the implementation of the HTTP
61
65
protocol at the server side and is mainly intended for *internal use*.
62
66
It is used by library(thread_httpd) and library(inet_httpd)
Original file line number Diff line number Diff line change 83
83
84
84
/* * <module> Threaded HTTP server
85
85
86
+ Most code doesn't need to use this directly; instead use
87
+ library(http/http_server), which combines this library with the
88
+ typical HTTP libraries that most servers need.
89
+
86
90
This library defines the HTTP server frontend of choice for SWI-Prolog.
87
91
It is based on the multi-threading capabilities of SWI-Prolog and thus
88
92
exploits multiple cores to serve requests concurrently. The server
You can’t perform that action at this time.
0 commit comments