Optional
userPrivate
_setPrivate
_setreturns the escaped form of this.fragment.
In general there are multiple possible escaped forms of any fragment. escapedFragment() returns this.rawFragment when it is a valid escaping of this.fragment. Otherwise escapedFragment() ignores this.rawFragment and computes an escaped form on its own.
The toString method uses escapedFragment() to construct its result. In general, code should call EscapedFragment instead of reading this.rawFragment directly.
returns the escaped form of this.path.
In general there are multiple possible escaped forms of any path. escapedPath() returns this.rawPath when it is a valid escaping of this.path. Otherwise escapedPath() ignores this.rawPath and computes an escaped form on its own.
The toString and RequestURI method uses escapedPath() to construct its result. In general, code should call escapedPath instead of reading this.rawPath directly.
resolves a URI reference to an absolute URI from an absolute base URI this, per RFC 3986 Section 5.2.
The URI reference may be relative or absolute. resolveReference always returns a new URL instance, even if the returned URL is identical to either the base or reference. If ref is an absolute URL, then resolveReference ignores base and returns a copy of ref.
reassembles the URL into a valid URL string.
The general form of the result is one of:
If this.opaque is non-empty, toString uses the first form; otherwise it uses the second form. Any non-ASCII characters in host are escaped. To obtain the path, toString uses this.escapedPath().
In the second form, the following rules apply:
If true replaces any password with "xxxxx".
Static
Private
_parseStatic
parseparses a raw url into a URL class.
The url may be relative (a path, without a host) or absolute (starting with a scheme). Trying to parse a hostname and path without a scheme is invalid but may not necessarily return an error, due to parsing ambiguities.
Exception
Static
parseparses a raw url into a URL class.
It assumes that url was received in an HTTP request, so the url is interpreted only as an absolute URI or an absolute path. The string url is assumed not to have a #fragment suffix. (Web browsers strip #fragment before sending the URL to a web server.)
Exception
Generated using TypeDoc
encoded opaque data