Adds a new Query String parameter key-value pair.
Adds a new Query String parameter key-value pair.
name-value pair for the query parameter to be added
A new Url with the new Query String parameter
Adds a new Query String parameter key-value pair.
Adds a new Query String parameter key-value pair.
name of the parameter
value for the parameter
A new Url with the new Query String parameter
Adds a new Query String parameter key-value pair.
Adds a new Query String parameter key-value pair.
Pairs with values, such as Some("value")
, represent query params with values, i.e ?param=value
By default, pairs without values, i.e None
, represent query params without values, i.e ?param
Using a UriConfig(renderQuery = ExcludeNones)
, will cause pairs with None
values not to be rendered
name of the parameter
value for the parameter
A new Url with the new Query String parameter
Adds a new Query String parameter key-value pair.
Adds a new Query String parameter key-value pair.
Pairs with values, such as ("param", Some("value"))
, represent query params with values, i.e ?param=value
By default, pairs without values, such as ("param", None)
, represent query params without values, i.e ?param
Using a UriConfig(renderQuery = ExcludeNones)
, will cause pairs with None
values not to be rendered
name-value pair for the query parameter to be added
A new Url with the new Query String parameter
Adds all the specified key-value pairs as parameters to the query
Adds all the specified key-value pairs as parameters to the query
A list of key-value pairs to add as query parameters
A new Url with the new Query String parameters
Adds all the specified key-value pairs as parameters to the query
Adds all the specified key-value pairs as parameters to the query
A list of key-value pairs to add as query parameters
A new Url with the new Query String parameters
Adds all the specified key-value pairs as parameters to the query
Adds all the specified key-value pairs as parameters to the query
Pairs with values, such as ("param", Some("value"))
, represent query params with values, i.e ?param=value
By default, pairs without values, such as ("param", None)
, represent query params without values, i.e ?param
Using a UriConfig(renderQuery = ExcludeNones)
, will cause pairs with None
values not to be rendered
A list of key-value pairs to add as query parameters
A new Url with the new Query String parameters
Adds all the specified key-value pairs as parameters to the query
Adds all the specified key-value pairs as parameters to the query
Pairs with values, such as ("param", Some("value"))
, represent query params with values, i.e ?param=value
By default, pairs without values, such as ("param", None)
, represent query params without values, i.e ?param
Using a UriConfig(renderQuery = ExcludeNones)
, will cause pairs with None
values not to be rendered
A list of key-value pairs to add as query parameters
A new Url with the new Query String parameters
Returns the apex domain for this URL.
Returns the apex domain for this URL.
The apex domain is constructed from the public suffix for this URL's host prepended with the immediately preceding dot segment.
Examples include:
example.com
for www.example.com
example.co.uk
for www.example.co.uk
the apex domain for this URL
Transforms the Query String by applying the specified PartialFunction to each Query String Parameter
Transforms the Query String by applying the specified PartialFunction to each Query String Parameter
Parameters not defined in the PartialFunction will be removed.
A function that returns a new Parameter when applied to each Parameter
Removes any Query String Parameters that return false when applied to the given Function
Removes any Query String Parameters that return false when applied to the given Function
Removes any Query String Parameters that return false when their name is applied to the given Function
Removes any Query String Parameters that return false when their name is applied to the given Function
Removes any Query String Parameters that return false when their value is applied to the given Function
Removes any Query String Parameters that return false when their value is applied to the given Function
Transforms the Query String by applying the specified Function to each Query String Parameter
Transforms the Query String by applying the specified Function to each Query String Parameter
A function that returns a collection of Parameters when applied to each parameter
Returns the longest subdomain for this URL's host.
Returns the longest subdomain for this URL's host. E.g. for http://a.b.c.example.com returns a.b.c.example
the longest subdomain for this URL's host
Transforms the Query String by applying the specified PartialFunction to each Query String Parameter
Transforms the Query String by applying the specified PartialFunction to each Query String Parameter
Parameters not defined in the PartialFunction will be left as-is.
A function that returns a new Parameter when applied to each Parameter
Transforms the Query String by applying the specified Function to each Query String Parameter name
Transforms the Query String by applying the specified Function to each Query String Parameter name
A function that returns a new Parameter name when applied to each Parameter name
Transforms the Query String by applying the specified Function to each Query String Parameter value
Transforms the Query String by applying the specified Function to each Query String Parameter value
A function that returns a new Parameter value when applied to each Parameter value
Returns the longest public suffix for the host in this URI.
Returns the longest public suffix for the host in this URI. Examples include:
com
for www.example.com
co.uk
for www.example.co.uk
the longest public suffix for the host in this URI
Returns all longest public suffixes for the host in this URI.
Returns all longest public suffixes for the host in this URI. Examples include:
com
for www.example.com
co.uk
and uk
for www.example.co.uk
all public suffixes for the host in this URI
Removes all Query String parameters with a name in the specified list
Removes all Query String parameters with a name in the specified list
Names of Query String parameter(s) to remove
Removes all Query String parameters with a name in the specified list
Removes all Query String parameters with a name in the specified list
Names of Query String parameter(s) to remove
Removes all Query String parameters with the specified key
Removes all Query String parameters with the specified key
Key for the Query String parameter(s) to remove
Removes all Query String parameters
Removes all Query String parameters
Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.
Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.
Key for the Query String parameter(s) to replace
value to replace with
A new Uri with the result of the replace
Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.
Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.
Pairs with values, such as ("param", Some("value"))
, represent query params with values, i.e ?param=value
By default, pairs without values, such as ("param", None)
, represent query params without values, i.e ?param
Using a UriConfig(renderQuery = ExcludeNones)
, will cause pairs with None
values not to be rendered
Key for the Query String parameter(s) to replace
value to replace with
A new Uri with the result of the replace
Returns the shortest subdomain for this URL's host.
Returns the shortest subdomain for this URL's host. E.g. for http://a.b.c.example.com returns a
the shortest subdomain for this URL's host
Returns the second largest subdomain for this URL's host.
Returns the second largest subdomain for this URL's host.
E.g. for http://a.b.c.example.com returns a.b.c
Note: In the event there is only one subdomain (i.e. the host is the apex domain), this method returns None
.
E.g. This method will return None
for http://example.com
.
the second largest subdomain for this URL's host
Returns all subdomains for this URL's host.
Returns all subdomains for this URL's host. E.g. for http://a.b.c.example.com returns a, a.b, a.b.c and a.b.c.example
all subdomains for this URL's host
Converts to a java.net.URI
Converts to a java.net.URI
This involves a toString
and URI.parse
because the specific java.net.URI
constructors do not deal properly with encoded elements
a java.net.URI
matching this io.lemonlabs.uri.Uri
the URL as a String. If the URI has a domain name for a host, any unicode characters will be returned in ASCII Compatible Encoding (ACE), as defined by the ToASCII operation of RFC 3490.
Returns the path with no encoders taking place (e.g.
Returns the path with no encoders taking place (e.g. non ASCII characters will not be percent encoded)
String containing the raw path for this Uri
Copies this Url but with the authority set as the given value.
Copies this Url but with the authority set as the given value.
the authority host to set
a new Url with the specified authority
Copies this Url but with the fragment set as the given value.
Copies this Url but with the fragment set as the given value.
the new fragment to set
a new Url with the specified fragment
Copies this Url but with the fragment set as the given value.
Copies this Url but with the fragment set as the given value.
the new fragment to set
a new Url with the specified fragment
Copies this Url but with the host set as the given value.
Copies this Url but with the host set as the given value.
the new host to set
a new Url with the specified host
Copies this Url but with the host set as the given value.
Copies this Url but with the host set as the given value.
the new host to set
a new Url with the specified host
Copies this Url but with the password set as the given value.
Copies this Url but with the password set as the given value.
the new password to set
a new Url with the specified password
Copies this Url but with the path set as the given value.
Copies this Url but with the path set as the given value.
If the specified path is non empty *and* doesn't have a leading slash, one will be added, as per RFC 3986: When authority is present, the path must either be empty or begin with a slash ("/") character.
the new path to set
a new Url with the specified path
Copies this Url but with the port set as the given value.
Copies this Url but with the port set as the given value.
the new port to set
a new Url with the specified port
Copies this Url but with the query set as the given value.
Copies this Url but with the query set as the given value.
the new QueryString to set
a new Url with the specified query
Replaces the all existing Query String parameters with a new set of query params
Replaces the all existing Query String parameters with a new set of query params
Replaces the all existing Query String parameters with a new set of query params
Replaces the all existing Query String parameters with a new set of query params
Pairs with values, such as ("k", Some("v")), represent query params with values, i.e ?k=v Pairs without values, such as ("k", None), represent query params without values, i.e ?k
Copies this Uri but with the scheme set as the given value.
Copies this Uri but with the scheme set as the given value.
the new scheme to set
a new Uri with the specified scheme
Copies this Url but with the user set as the given value.
Copies this Url but with the user set as the given value.
the new user to set
a new Url with the specified user
Represents absolute URLs, for example:
http://example.com