4.1 trivial-http-system

4.2 trivial-http

trivial-http is a simple networking library for doing HTTP POST
and GET over a socket interface. It establishes a package trivial-http,
also called SHTTP, from which the following functions are exported:
http-get, http-post, escape-url-query and http-head.

Resolves ‘url‘ using http-resolve and downloads the contents of the
stream it to ‘destination‘. Destination is assumed to be a file.
Returns (as multiple values) the number of elements downloaded
(e.g., bytes) and the actual URL.

Similar to [http-get][], ‘http-resolve‘ returns a list of four
elements: the HTTP response code, the headers, the stream
and the resolved URL. HTTP-response resolves 301 and 302
responses, and signals an error on responses greater
than 400. If there is not an error, then the caller is responsible
for closing the HTTP stream.