2 (www url)
The (www url)
module provides procedures for high-level url
object conversion, low-level url object construction and access,
and character decoding/encoding.
2.1 High-Level URL Object Conversion
— Procedure:
url:parse string
Parse string and return a url object, with one of the
following "schemes": HTTP, FTP, mailto, unknown.
— Procedure:
url:unparse url
Return the url object formatted as a string.
Note: The username portion is not included!
2.2 Low-Level URL Object Construction
— Procedure:
url:make scheme [
args...]
Construct a url object with specific scheme and other args.
The number and meaning of args depends on the scheme.
— Procedure:
url:make-http host port path
Construct a HTTP-specific url object with
host, port and path portions.
— Procedure:
url:make-ftp user host port path
Construct a FTP-specific url object with
user, host, port and path portions.
— Procedure:
url:make-mailto address
Construct a mailto-specific url object with
an address portion.
2.3 Low-Level URL Object Access
— Procedure:
url:scheme url
Extract and return the "scheme" portion of a url object.
url:scheme
is an unfortunate term, but it is the technical
name for that portion of the URL according to RFC 1738. Sigh.
— Procedure:
url:user url
Extract and return the "user" portion of the url object.
— Procedure:
url:host url
Extract and return the "host" portion of the url object.
— Procedure:
url:port url
Extract and return the "port" portion of the url object.
— Procedure:
url:path url
Extract and return the "path" portion of the url object.
NB: The following two procedures will NO LONGER BE AVAILABLE
after 2012-12-31. They are misguided attempts at abstraction better
left behind.
— Procedure:
url:address url
Extract and return the "address" portion of the url object.
— Procedure:
url:unknown url
Extract and return the "unknown" portion of the url object.
2.4 Character Decoding/Encoding
— Procedure:
url:decode str
Re-export url-coding:decode
. See url-coding.
— Procedure:
url:encode str reserved-chars
Re-export url-coding:encode
. See url-coding.