ADDED: library(http/http_open), opening HTTP and HTTPS streams for reading

Example:

   ?- http_open("https://github.com/mthom/scryer-prolog", Stream, []),
      length(Ls, 10),
      maplist(get_char(Stream), Ls).

Yielding:

   %@    Stream = '$stream'(0x7fba4c59ef10), Ls = "\n\n\n\n\n<!DOC"
   %@ ;  false.
This commit is contained in:
Markus Triska
2020-06-13 09:32:08 +02:00
parent bc81ff28d8
commit 19acd608a5
2 changed files with 85 additions and 0 deletions

View File

@@ -420,6 +420,8 @@ The modules that ship with Scryer&nbsp;Prolog are also called
Provides *delimited continuations* via `reset/3` and `shift/1`.
* [`random`](src/lib/random.pl)
Probabilistic predicates and random number generators.
* [`http/http_open`](src/lib/http/http_open.pl) Open a stream to
read answers from web&nbsp;servers. HTTPS is also supported.
* [`sockets`](src/lib/sockets.pl)
Predicates for opening and accepting TCP connections as streams.
TLS negotiation is performed via the option `tls(true)` in