Next: url-coding, Previous: cgi, Up: Top
The (www main)
module provides a generic interface useful for
retriving data named by any URL. The URL scheme http
is pre-registered.
Associate for scheme proto the procedure handler. proto is a symbol, while handler is a procedure that takes three strings: the host, port and path portions, respectively of a url object. Its return value is the return value of
www:get
(for proto), and need not be a string.
Parse url-string into portions. For HTTP, open a connection, retrieve and return the specified document. Otherwise, consult the handler procedure registered for the particular scheme and apply it to the host, port and path portions of url-string. If no such handler exists, signal "unknown URL scheme" error.
There is also the convenience proc www:http-head-get
.