final case class Uri(scheme: Option[CaseInsensitiveString] = None, authority: Option[Authority] = None, path: Path = "", query: Query = Query.empty, fragment: Option[Fragment] = None) extends QueryOps with Renderable with Product with Serializable
Representation of the Request URI
- scheme
optional Uri Scheme. eg, http, https
- authority
optional Uri Authority. eg, localhost:8080, www.foo.bar
- path
url-encoded string representation of the path component of the Uri.
- query
optional Query. url-encoded.
- fragment
optional Uri Fragment. url-encoded.
- Source
- Uri.scala
- Alphabetic
- By Inheritance
- Uri
- Serializable
- Serializable
- Product
- Equals
- Renderable
- QueryOps
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Uri(scheme: Option[CaseInsensitiveString] = None, authority: Option[Authority] = None, path: Path = "", query: Query = Query.empty, fragment: Option[Fragment] = None)
- scheme
optional Uri Scheme. eg, http, https
- authority
optional Uri Authority. eg, localhost:8080, www.foo.bar
- path
url-encoded string representation of the path component of the Uri.
- query
optional Query. url-encoded.
- fragment
optional Uri Fragment. url-encoded.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
-
def
+*?[T](values: Seq[T])(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+*?[T](value: T)(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+?[K, T](name: K, values: Seq[T])(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+?[K](name: K)(implicit arg0: QueryParamKeyLike[K]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+?[K, T](name: K, value: T)(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+?[T](implicit arg0: QueryParam[T]): Self
alias for withQueryParam
alias for withQueryParam
- Definition Classes
- QueryOps
-
def
+??[T](value: Option[T])(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self
alias for withOptionQueryParam
alias for withOptionQueryParam
- Definition Classes
- QueryOps
-
def
+??[K, T](name: K, value: Option[T])(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self
alias for withOptionQueryParam
alias for withOptionQueryParam
- Definition Classes
- QueryOps
-
def
+??[T](value: Maybe[T])(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self
alias for withMaybeQueryParam
alias for withMaybeQueryParam
- Definition Classes
- QueryOps
-
def
+??[K, T](name: K, value: Maybe[T])(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self
alias for withMaybeQueryParam
alias for withMaybeQueryParam
- Definition Classes
- QueryOps
- def ->[B](y: B): (Uri, B)
-
def
-?[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Self
alias for removeQueryParam
alias for removeQueryParam
- Definition Classes
- QueryOps
-
def
-?[T](implicit key: QueryParam[T]): Self
alias for removeQueryParam
alias for removeQueryParam
- Definition Classes
- QueryOps
- def /(newSegment: Path): Uri
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
=?[T](q: Map[String, Seq[T]])(implicit arg0: QueryParamEncoder[T]): Self
alias for setQueryParams
alias for setQueryParams
- Definition Classes
- QueryOps
-
def
?[K](name: K)(implicit arg0: QueryParamKeyLike[K]): Boolean
alias for containsQueryParam
alias for containsQueryParam
- Definition Classes
- QueryOps
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val authority: Option[Authority]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
containsQueryParam[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Boolean
- Definition Classes
- QueryOps
-
def
containsQueryParam[T](implicit key: QueryParam[T]): Boolean
Checks if a specified parameter exists in the Query.
- def ensuring(cond: (Uri) ⇒ Boolean, msg: ⇒ Any): Uri
- def ensuring(cond: (Uri) ⇒ Boolean): Uri
- def ensuring(cond: Boolean, msg: ⇒ Any): Uri
- def ensuring(cond: Boolean): Uri
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
- val fragment: Option[Fragment]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- def host: Option[Host]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
multiParams: Map[String, Seq[String]]
Representation of the query string as a map
Representation of the query string as a map
In case a parameter is available in query string but no value is there the sequence will be empty. If the value is empty the the sequence contains an empty string.
Examples
Query String Map ?param=v
Map("param" -> Seq("v"))
?param=
Map("param" -> Seq(""))
?param
Map("param" -> Seq())
?=value
Map("" -> Seq("value"))
?p1=v1&p1=v2&p2=v3&p2=v3
Map("p1" -> Seq("v1","v2"), "p2" -> Seq("v3","v4"))
The query string is lazily parsed. If an error occurs during parsing an empty
Map
is returned. -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
params: Map[String, String]
View of the head elements of the URI parameters in query string.
View of the head elements of the URI parameters in query string.
In case a parameter has no value the map returns an empty string.
- See also
multiParams
- val path: Path
- def port: Option[Int]
- val query: Query
-
def
removeQueryParam[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Self
Creates maybe a new
Self
without the specified parameter in query.Creates maybe a new
Self
without the specified parameter in query. If no parameter with the givenkey
exists thenthis
will be returned.- Definition Classes
- QueryOps
-
def
render(writer: Writer): writer.type
Base method for rendering this object efficiently
Base method for rendering this object efficiently
- Definition Classes
- Uri → Renderable
-
lazy val
renderString: String
Generates a String rendering of this object
Generates a String rendering of this object
- Definition Classes
- Uri → Renderable
- def replaceQuery(query: Query): Self
- def resolve(relative: Uri): Uri
- val scheme: Option[CaseInsensitiveString]
- def self: Self
-
def
setQueryParams[K, T](params: Map[K, Seq[T]])(implicit arg0: QueryParamKeyLike[K], arg1: QueryParamEncoder[T]): Self
Creates maybe a new
Self
with the specified parameters. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Renderable → Any
- def userInfo: Option[UserInfo]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withMaybeQueryParam[T](value: Maybe[T])(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self
Creates maybe a new
Self
with the specified parameter in the Query. -
def
withMaybeQueryParam[T, K](key: K, value: Maybe[T])(implicit arg0: QueryParamEncoder[T], arg1: QueryParamKeyLike[K]): Self
Creates maybe a new
Self
with the specified parameter in the Query. -
def
withOptionQueryParam[T](value: Option[T])(implicit arg0: QueryParam[T], arg1: QueryParamEncoder[T]): Self
Creates maybe a new
Self
with the specified parameter in the Query. -
def
withOptionQueryParam[T, K](key: K, value: Option[T])(implicit arg0: QueryParamEncoder[T], arg1: QueryParamKeyLike[K]): Self
Creates maybe a new
Self
with the specified parameter in the Query. - def withPath(path: Path): Uri
-
def
withQueryParam[T, K](key: K, values: Seq[T])(implicit arg0: QueryParamEncoder[T], arg1: QueryParamKeyLike[K]): Self
Creates maybe a new
Self
with the specified parameters in the Query. -
def
withQueryParam[T, K](key: K, value: T)(implicit arg0: QueryParamEncoder[T], arg1: QueryParamKeyLike[K]): Self
Creates maybe a new
Self
with the specified parameter in the Query. -
def
withQueryParam[K](key: K)(implicit arg0: QueryParamKeyLike[K]): Self
Creates a new
Self
with the specified parameter in the Query. -
def
withQueryParam[T](implicit arg0: QueryParam[T]): Self
Creates a new
Self
with the specified parameter in the Query. - def →[B](y: B): (Uri, B)