A URI. Can represent both relative and absolute URIs, hence in terms of https://tools.ietf.org/html/rfc3986, this is a URI reference.
All components (scheme, host, query, ...) are stored decoded, and become encoded upon serialization (using toString).
Instances can be created using the uri interpolator: uri"..."
(see UriInterpolator), or the factory methods on the Uri companion object.
The apply
/safeApply
/unsafeApply
methods create absolute URIs and require a host. The relative
methods creates a relative URI, given path/query/fragment components.
Value parameters
- querySegments
-
Either key-value pairs, single values, or plain query segments. Key value pairs will be serialized as
k=v
, and blocks of key-value pairs/single values will be combined using&
. Note that no&
or other separators are added around plain query segments - if required, they need to be added manually as part of the plain query segment. Custom encoding logic can be provided when creating a segment.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Replace the fragment.
Replace the fragment.
Attributes
Replace the host. Does not validate the new host value if it's nonempty.
Replace the host. Does not validate the new host value if it's nonempty.
Attributes
Replace the host. Does not validate the new host value if it's nonempty.
Replace the host. Does not validate the new host value if it's nonempty.
Attributes
Replace the host. Does not validate the new host value if it's nonempty.
Replace the host. Does not validate the new host value if it's nonempty.
Attributes
Replace the port. Adds an empty host if one is absent.
Replace the port. Adds an empty host if one is absent.
Attributes
Replace the port. Adds an empty host if one is absent, and port is defined.
Replace the port. Adds an empty host if one is absent, and port is defined.
Attributes
Replace encoding for query segments: applies to key-value, only-value and plain ones.
Replace encoding for query segments: applies to key-value, only-value and plain ones.
Attributes
Replace encoding for the value part of key-value query segments and for only-value ones.
Replace encoding for the value part of key-value query segments and for only-value ones.
Attributes
Replace the scheme. Does not validate the new scheme value.
Replace the scheme. Does not validate the new scheme value.
Attributes
Replace the scheme. Does not validate the new scheme value.
Replace the scheme. Does not validate the new scheme value.
Attributes
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any
Replace the user info with a username only. Adds an empty host if one is absent.
Replace the user info with a username only. Adds an empty host if one is absent.
Attributes
Replace the user info with username/password combination. Adds an empty host if one is absent.
Replace the user info with username/password combination. Adds an empty host if one is absent.
Attributes
Replace the user info with username/password combination. Adds an empty host if one is absent, and user info is defined.
Replace the user info with username/password combination. Adds an empty host if one is absent, and user info is defined.
Attributes
Replace query with the given single parameter.
Replace query with the given single parameter.
Attributes
Replace query with the given single optional parameter.
Replace query with the given single optional parameter.
Attributes
Replace query with the given parameters.
Replace query with the given parameters.
Attributes
Replace query with the given parameters.
Replace query with the given parameters.
Attributes
Replace query with the given parameters.
Replace query with the given parameters.
Attributes
Replace the whole path with the given one. Leading /
will be removed, if present, and the path will be split into segments on /
.
Replace the whole path with the given one. Leading /
will be removed, if present, and the path will be split into segments on /
.
Attributes
Deprecated methods
Adds the given parameter to the query.
Adds the given parameter to the query.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addParam or withParam
Adds the given parameter with an optional value to the query if it is present.
Adds the given parameter with an optional value to the query if it is present.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addParam or withParam
Adds the given parameters to the query.
Adds the given parameters to the query.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addParam or withParam
Adds the given parameters to the query.
Adds the given parameters to the query.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addParam or withParam
Adds the given parameters to the query.
Adds the given parameters to the query.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addParam or withParam
Replace path with the given single-segment path.
Replace path with the given single-segment path.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addPath, withPath or withWholePath
Replace path with the given path segments.
Replace path with the given path segments.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addPath, withPath or withWholePath
Replace path with the given path segments.
Replace path with the given path segments.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addPath, withPath or withWholePath
Replace path with the given path segment.
Replace path with the given path segment.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addPath, withPath or withWholePath
Replace path with the given path segment.
Replace path with the given path segment.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addPath, withPath or withWholePath
Replace path with the given path segments.
Replace path with the given path segments.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addPath, withPath or withWholePath
Adds the given query segment.
Adds the given query segment.
Attributes
- Deprecated
-
[Since version 1.2.0]
Use addQuerySegment
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product