purl API Documentation
purl
Parse and print Uniform Resource Locators as defined in RFC 1738.
URL Designators
A url designator is a value accepted by the url
function. E.g. a url, a string or a pathname.
make‑url (Function)
Syntax:
— Function: make‑url scheme &key
address user password host port path
Arguments and Values:
scheme—a keyword denoting a URL scheme.
address—a string denoting a URL address for scheme or nil
. The default is nil
.
user, password, host—strings denoting a user name, password or hostname respectively or nil
. The default is nil
.
path—a string or a pathname.
port—a positive integer denoting a port number or nil
. The default is nil
.
Description:
make-url
returns a fresh url of scheme. Address is used as the URL's address if supplied. Otherwise the URL's address will use Common Internet Scheme Syntax¹ and its address is composed of the user, password, host, port and path components.
See Also:
url (Function)
Syntax:
— Function: url urlspec
Arguments and Values:
urlspec—a string, a pathname or a url.
Description:
url
returns the url denoted by urlspec. When urlspec is a string, url
will attempt to parse urlspec as a URL. When urlspec is a pathname, url
will return an equivalent url using the :file
scheme.
Exceptional Situations:
An error of type malformed-url
is signaled when urlspec is a string and can not be parsed as a URL.
An error of type type-error
is signaled when urlspec is a pathname using a host component which is not a defined logical host.
url (Type)
A url is a structured object which represents a Uniform Resource Locator (URL).
url‑address (Function)
Syntax:
— Function: url‑address url
Arguments and Values:
url—a url designator.
Description:
url-address
returns a string denoting the address part of url.
url‑decode (Function)
Syntax:
— Function: url‑decode string
Arguments and Values:
string—a _string.
Description:
url-decode
decodes encoded string using Percent-Encoding¹.
See Also:
url‑encode (Function)
Syntax:
— Function: url‑encode string
Arguments and Values:
string—a _string.
Description:
url-encode
encodes string using Percent-Encoding¹.
See Also:
url‑host (Function)
Syntax:
— Function: url‑host url
Arguments and Values:
url—a url designator.
Description:
url-host
returns a string denoting the host part of url.
url‑p (Function)
Syntax:
— Function: url‑p object
Arguments and Values:
object—an object.
Description:
url-p
returns true if object is of type url
; otherwise, returns false.
url‑password (Function)
Syntax:
— Function: url‑password url
Arguments and Values:
url—a url designator.
Description:
url-password
returns a string denoting the password part of url.
url‑path (Function)
Syntax:
— Function: url‑path url
Arguments and Values:
url—a url designator.
Description:
url-path
returns a string denoting the path part of url.
url‑port (Function)
Syntax:
— Function: url‑port url
Arguments and Values:
url—a url designator.
Description:
url-port
returns a non-negative integer denoting the port part of url.
url‑scheme (Function)
Syntax:
— Function: url‑scheme url
Arguments and Values:
url—a url designator.
Description:
url-scheme
returns a keyword denoting the scheme part of url.
url‑string (Function)
Syntax:
— Function: url‑string url
Arguments and Values:
url—a url designator.
Description:
url-string
returns a string representation of url.
url‑user (Function)
Syntax:
— Function: url‑user url
Arguments and Values:
url—a url designator.
Description:
url-user
returns a string denoting the user part of url.
url= (Function)
Syntax:
— Function: url= url1 url2
Arguments and Values:
url1, url2—urls.
Description:
url=
returns true if url1 and url2 are equal; otherwise, returns false.