url-generic-parse-url
url-generic-parse-url is an autoloaded compiled Lisp function in `url-parse.el
'.
(url-generic-parse-url URL)
Return an URL-struct of the parts of URL.
The CL-style struct contains the following fields:
TYPE is the URI scheme (string or nil).
USER is the user name (string or nil).
PASSWORD is the password (string [deprecated] or nil).
HOST is the host (a registered name, IP literal in square
brackets, or IPv4 address in dotted-decimal form).
PORTSPEC is the specified port (a number), or nil.
FILENAME is the path AND the query component of the URI.
TARGET is the fragment identifier component (used to refer to a
subordinate resource, e.g. a part of a webpage).
ATTRIBUTES is nil; this slot originally stored the attribute and
value alists for IMAP URIs, but this feature was removed
since it conflicts with RFC 3986.
FULLNESS is non-nil if the hierarchical sequence component of
the URL starts with two slashes, "//".
The parser follows RFC 3986, except that it also tries to handle
URIs that are not fully specified (e.g. lacking TYPE), and it
does not check for or perform %-encoding.
Here is an example. The URL
foo://bob:pass@example.com:42/a/b/c.dtb?type=animal&name=narwhal#nose
parses to
TYPE = "foo"
USER = "bob"
PASSWORD = "pass"
HOST = "example.com"
PORTSPEC = 42
FILENAME = "/a/b/c.dtb?type=animal&name=narwhal"
TARGET = "nose"
ATTRIBUTES = nil
FULLNESS = t