Converts this instance to a java.
Converts this instance to a java.net.URL if possible. This will succeed if isURL would return true.
if some of the necessary information is missing, i.e. this instance is relative.
Gets the extension of the last path segment, if any.
Gets the last path segment, if any.
Gets the host and port parts as a string.
Gets the host and port parts as a string. E.g. "localhost:8080"
Tests whether this instance is convertible to an absolute URL.
Gets the path concatenated with the fragment identifier (if any) and the query parameters (if any).
Extracts the parts of the query string as a map of strings.
Extracts the parts of the query string as a map of strings. This does not allow for duplicate keys, which is
a legitimate situation in query strings. So this method is only useful in particular use-cases where this
cannot happen, Otherwise, use the more-general method queryParts
.
If the query string is absent, an empty map is returned.
Extracts the parts of the query string as a list of tuples.
Extracts the parts of the query string as a list of tuples. This allows for duplicate keys, which is
a legitimate situation in query strings. If a particular use-case requires that this /cannot/ happen, the
other method queryMap
may be simpler to use.
If the query string is absent, an empty list is returned.
Tests whether this instances starts with another instance.
Tests whether this instances starts with another instance. This is true if both endpoints are the same (possibly None) and this path starts with the other path.
Creates a new instance, replacing any query string with a new one formed from a map of key/values pairs.
Creates a new instance, replacing any query string with a new one formed from a map of key/values pairs. The parts of the query string will be URL-encoded automatically. The supplied parameter map may be empty, indicating there is no query string.
This method provides an alternative to use using copy
to change the query
field.
Creates a new instance, replacing any query string with a new one formed from a list of key/values pairs.
Creates a new instance, replacing any query string with a new one formed from a list of key/values pairs. The parts of the query string will be URL-encoded automatically. The supplied parameter list may be empty, indicating there is no query string.
This method provides an alternative to use using copy
to change the query
field.
Provides a utility wrapper for URLs that splits them into their component parts and allows alteration and reassembly with different components. Instances may be relative URLs.
Use the case-class 'copy' method to alter components.
This class broadly supports the URL part of RFC-3986 http://tools.ietf.org/html/rfc3986.