Represents Relative URLs which do not contain an authority. Examples include:
-
Root Relative: `/index.html?a=b`
- Rootless Relative:
index.html?a=b
- Rootless Relative
(with dot segment):
../index.html?a=b
- Companion
- object
Type members
Types
Value members
Concrete methods
Inherited methods
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
- Value Params
- k
value that provides a name pair for the parameter. Can be a any basic value type or a custom type if you provide a
QueryKey
type-class- v
value that provides a value for the parameter. Can be a any basic value type or a custom type if you provide a
QueryValue
type-class
- Returns
A new Url with the new Query String parameter
- Inherited from
- Url
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
- Value Params
- a
value that provides a name/value pair for the parameter. Can be a Tuple of any basic value types or a custom type if you provide a
QueryKeyValue
type-class
- Returns
A new Url with the new Query String parameter
- Inherited from
- Url
Adds all the specified key-value pairs as parameters to the query
Adds all the specified key-value pairs as parameters to the query
- Value Params
- params
A list of key-value pairs to add as query parameters
- Returns
A new Url with the new Query String parameters
- Inherited from
- Url
Adds all the specified key-value pairs as parameters to the query
Adds all the specified key-value pairs as parameters to the query
- Value Params
- params
A list of key-value pairs to add as query parameters
- Returns
A new Url with the new Query String parameters
- Inherited from
- Url
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
- Returns
the apex domain for this URL
- Inherited from
- 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.
- Value Params
- f
A function that returns a new Parameter when applied to each Parameter
- Inherited from
- Url
Similar to ==
but ignores the ordering of any query string parameters
Similar to ==
but ignores the ordering of any query string parameters
- Inherited from
- Url
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
- Inherited from
- Url
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
- Inherited from
- Url
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
- Inherited from
- Url
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
- Value Params
- f
A function that returns a collection of Parameters when applied to each parameter
- Inherited from
- 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 left as-is.
- Value Params
- f
A function that returns a new Parameter when applied to each Parameter
- Inherited from
- Url
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
- Value Params
- f
A function that returns a new Parameter name when applied to each Parameter name
- Inherited from
- Url
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
- Value Params
- f
A function that returns a new Parameter value when applied to each Parameter value
- Inherited from
- Url
Removes all Query String parameters with a name in the specified list
Removes all Query String parameters with a name in the specified list
- Value Params
- k
Names of Query String parameter(s) to remove
- Inherited from
- Url
Removes all Query String parameters with a name in the specified list
Removes all Query String parameters with a name in the specified list
- Value Params
- first
Name of a Query String parameter to remove
- rest
Name of more Query String parameter(s) to remove
- second
Name of another Query String parameter to remove
- Inherited from
- Url
Removes all Query String parameters with the specified key
Removes all Query String parameters with the specified key
- Value Params
- k
Key for the Query String parameter(s) to remove
- Inherited from
- Url
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
- Value Params
- k
Key for the Query String parameter(s) to replace
- v
value to replace with
- Returns
A new Uri with the result of the replace
- Inherited from
- Url
- Returns
this URL resolved with the given URL as the base according to section 5.2.2 Transform References of <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986</a>.
- Inherited from
- Url
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
- Returns
a
java.net.URI
matching thisio.lemonlabs.uri.Uri
- Inherited from
- Uri
- Returns
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 <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>.
- Inherited from
- Url
Returns the path with no encoders taking place (e.g. non ASCII characters will not be percent encoded)
Returns the path with no encoders taking place (e.g. non ASCII characters will not be percent encoded)
- Returns
String containing the raw path for this Uri
- Inherited from
- Uri
Copies this Url but with the host set as the given value.
Copies this Url but with the host set as the given value.
- Value Params
- host
the new host to set
- Returns
a new Url with the specified host
- Inherited from
- Url
Copies this Url but with the path set as the given value.
Copies this Url but with the path set as the given value.
- Value Params
- parts
the parts that make up the new path
- Returns
a new Url with the specified path
- Inherited from
- Url
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
- Inherited from
- Url
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
- Inherited from
- Url