This module enables construction and processing of URLs and URIs.
Note
This module performs processing of Uniform Resource Identifiers as described in RFC 3986 - URI Generic Syntax.
URI(scheme :: Array(Num), hier :: Array(Num), query :: Array(Num), fragment :: Array(Num))
Stores all components as percent-encoded strings.
Given uri, a full URI string, returns a URI object. It is an error if uri is not a valid URI.
Takes an arbitrary string and encodes all necessary bytes so it may be used as a URI component. Returns the resulting string. Encodes all characters except ASCII-alphanumeric, ‘-‘, ‘.’, ‘_’ and ‘~’. It is an error if any element of string is outside the range [0, 255].
Takes an arbitrary string and encodes all necessary bytes so it may be used as a URI component. Spaces are encoded as a ‘+’ rather than “%20”, as per HTML forms. Otherwise, same as encodeURIComponent. It is an error if any element of string is outside the range [0, 255].
Takes a URI-encoded string, uristring, and decodes all percent-encoded sequences into their source bytes. The resulting string may contain non-ASCII bytes, with an unspecified encoding (dependent on the encoding used in the percent-encoded characters). It is usually safe to assume UTF-8 encoding.
Takes a URI-encoded string, uristring, and decodes all percent-encoded sequences into their source bytes. Also decodes ‘+’ into spaces. The resulting string may contain non-ASCII bytes, with an unspecified encoding (dependent on the encoding used in the percent-encoded characters). It is usually safe to assume UTF-8 encoding.