case class Uri(scheme: String, userInfo: Option[UserInfo], hostSegment: Segment, port: Option[Int], pathSegments: Seq[Segment], querySegments: Seq[QuerySegment], fragmentSegment: Option[Segment]) extends Product with Serializable
A URI. 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.
- 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.
- Alphabetic
- By Inheritance
- Uri
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Uri(scheme: String, userInfo: Option[UserInfo], hostSegment: Segment, port: Option[Int], pathSegments: Seq[Segment], querySegments: Seq[QuerySegment], fragmentSegment: Option[Segment])
- 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.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def fragment: Option[String]
-
def
fragment(f: Option[String]): Uri
Replace the fragment.
-
def
fragment(f: String): Uri
Replace the fragment.
-
def
fragmentSegment(s: Option[Segment]): Uri
Replace the fragment.
- val fragmentSegment: Option[Segment]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def host: String
-
def
host(h: String): Uri
Replace the host.
Replace the host. Does not validate the new host value if it's nonempty.
-
def
hostSegment(s: Segment): Uri
Replace the host.
Replace the host. Does not validate the new host value if it's nonempty.
- val hostSegment: Segment
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
param(k: String, v: Option[String]): Uri
Adds the given parameter with an optional value to the query if it is present.
-
def
param(k: String, v: String): Uri
Adds the given parameter to the query.
- def params: QueryParams
-
def
params(ps: (String, String)*): Uri
Adds the given parameters to the query.
-
def
params(mqp: QueryParams): Uri
Adds the given parameters to the query.
-
def
params(ps: Map[String, String]): Uri
Adds the given parameters to the query.
- def paramsMap: Map[String, String]
- def paramsSeq: Seq[(String, String)]
- def path: Seq[String]
-
def
path(ps: Seq[String]): Uri
Replace path with the given path segments.
-
def
path(p1: String, p2: String, ps: String*): Uri
Replace path with the given path segments.
-
def
path(p: String): Uri
Replace path with the given single-segment path.
-
def
pathSegment(s: Segment): Uri
Replace path with the given path segment.
-
def
pathSegments(ss: Seq[Segment]): Uri
Replace path with the given path segments.
-
def
pathSegments(s1: Segment, s2: Segment, ss: Segment*): Uri
Replace path with the given path segment.
- val pathSegments: Seq[Segment]
- def port(p: Option[Int]): Uri
- def port(p: Int): Uri
- val port: Option[Int]
-
def
querySegment(qf: QuerySegment): Uri
Adds the given query segment.
- val querySegments: Seq[QuerySegment]
-
def
scheme(s: String): Uri
Replace the scheme.
Replace the scheme. Does not validate the new scheme value.
- val scheme: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toJavaUri: URI
-
def
toString(): String
- Definition Classes
- Uri → AnyRef → Any
- def userInfo(username: String, password: String): Uri
- def userInfo(username: String): Uri
- val userInfo: Option[UserInfo]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )