case class Uri(scheme: Option[String], user: Option[String], password: Option[String], host: Option[String], port: Option[Int], pathParts: Seq[PathPart], query: QueryString, fragment: Option[String]) extends SubdomainSupport with Product with Serializable
http://tools.ietf.org/html/rfc3986
- Alphabetic
- By Inheritance
- Uri
- Serializable
- Serializable
- Product
- Equals
- SubdomainSupport
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Uri(scheme: Option[String], user: Option[String], password: Option[String], host: Option[String], port: Option[Int], pathParts: Seq[PathPart], query: QueryString, fragment: Option[String])
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
- def addParam(kv: Param): Uri
-
def
addParam(name: String, value: Any): Uri
Adds a new Query String parameter key-value pair.
Adds a new Query String parameter key-value pair. If the value for the Query String parmeter is None, then this Query String parameter will not be rendered in calls to toString or toStringRaw
- name
name of the parameter
- value
value for the parameter
- returns
A new Uri with the new Query String parameter
- def addParams(kvs: Map[String, Any]): Uri
- def addParams(kvs: Seq[(String, Any)]): Uri
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
filterQuery(f: (Param) ⇒ Boolean): Uri
Removes any Query String Parameters that return false when applied to the given Function
-
def
filterQueryNames(f: (String) ⇒ Boolean): Uri
Removes any Query String Parameters that return false when their name is applied to the given Function
-
def
filterQueryValues(f: (String) ⇒ Boolean): Uri
Removes any Query String Parameters that return false when their value is applied to the given Function
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMapQuery(f: (Param) ⇒ GenTraversableOnce[Param]): Uri
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
- f
A function that returns a collection of Parameters when applied to each parameter
- val fragment: Option[String]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- val host: Option[String]
- lazy val hostParts: Seq[String]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
longestSubdomain: Option[String]
- Definition Classes
- SubdomainSupport
-
def
mapQuery(f: (Param) ⇒ Param): Uri
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
- f
A function that returns a new Parameter when applied to each Parameter
-
def
mapQueryNames(f: (String) ⇒ String): Uri
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
- f
A function that returns a new Parameter name when applied to each Parameter name
-
def
mapQueryValues(f: (String) ⇒ String): Uri
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
- f
A function that returns a new Parameter value when applied to each Parameter value
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- val password: Option[String]
-
def
path(implicit c: UriConfig = UriConfig.default): String
Returns the encoded path.
Returns the encoded path. By default non ASCII characters in the path are percent encoded.
- returns
String containing the path for this Uri
- def pathPart(name: String): PathPart
- def pathPartOption(name: String): Option[PathPart]
- val pathParts: Seq[PathPart]
-
def
pathRaw(implicit c: UriConfig = UriConfig.default): String
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)
- returns
String containing the raw path for this Uri
- val port: Option[Int]
- def protocol: Option[String]
-
def
publicSuffix: Option[String]
Returns the longest public suffix for the host in this URI.
Returns the longest public suffix for the host in this URI. Examples include:
comforwww.example.comco.ukforwww.example.co.uk- returns
the longest public suffix for the host in this URI
-
def
publicSuffixes: Seq[String]
Returns all longest public suffixes for the host in this URI.
Returns all longest public suffixes for the host in this URI. Examples include:
comforwww.example.comco.ukandukforwww.example.co.uk- returns
all public suffixes for the host in this URI
- val query: QueryString
- def queryString(implicit c: UriConfig = UriConfig.default): String
- def queryStringRaw(implicit c: UriConfig = UriConfig.default): String
-
def
removeAllParams(): Uri
Removes all Query String parameters
-
def
removeParams(a: Seq[String]): Uri
Removes all Query String parameters with the specified key contained in the a (Array)
Removes all Query String parameters with the specified key contained in the a (Array)
- a
an Array of Keys for the Query String parameter(s) to remove
-
def
removeParams(k: String): Uri
Removes all Query String parameters with the specified key
Removes all Query String parameters with the specified key
- k
Key for the Query String parameter(s) to remove
-
def
replaceAllParams(params: Param*): Uri
Replaces the all existing Query String parameters with a new set of query params
-
def
replaceParams(k: String, v: Any): Uri
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. If the value passed in is None, then all Query String parameters with the specified key are removed
- 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
- val scheme: Option[String]
-
def
shortestSubdomain: Option[String]
- Definition Classes
- SubdomainSupport
-
def
subdomain: Option[String]
Unable to do correct subdomain support for scala-js until
PublicSuffixesis ported.Unable to do correct subdomain support for scala-js until
PublicSuffixesis ported. This method exists for backwards compatibility- Definition Classes
- SubdomainSupport
-
def
subdomains: Seq[String]
- Definition Classes
- SubdomainSupport
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toString(implicit c: UriConfig = UriConfig.default): String
-
def
toString(): String
- Definition Classes
- Uri → AnyRef → Any
-
def
toStringRaw(implicit config: UriConfig = UriConfig.default): String
Returns the string representation of this Uri with no encoders taking place (e.g.
Returns the string representation of this Uri with no encoders taking place (e.g. non ASCII characters will not be percent encoded)
- returns
String containing this Uri in it's raw form
-
def
toURI(implicit c: UriConfig = UriConfig.conservative): URI
Converts to a Java URI.
Converts to a Java URI. This involves a toString + URI.parse because the specific URI constructors do not deal properly with encoded elements
- returns
a URI matching this Uri
- val user: Option[String]
-
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
withFragment(fragment: String): Uri
Copies this Uri but with the fragment set as the given value.
Copies this Uri but with the fragment set as the given value.
- fragment
the new fragment to set
- returns
a new Uri with the specified fragment
-
def
withHost(host: String): Uri
Copies this Uri but with the host set as the given value.
Copies this Uri but with the host set as the given value.
- host
the new host to set
- returns
a new Uri with the specified host
-
def
withPassword(password: String): Uri
Copies this Uri but with the password set as the given value.
Copies this Uri but with the password set as the given value.
- password
the new password to set
- returns
a new Uri with the specified password
-
def
withPort(port: Int): Uri
Copies this Uri but with the port set as the given value.
Copies this Uri but with the port set as the given value.
- port
the new port to set
- returns
a new Uri with the specified port
-
def
withScheme(scheme: String): Uri
Copies this Uri but with the scheme set as the given value.
Copies this Uri but with the scheme set as the given value.
- scheme
the new scheme to set
- returns
a new Uri with the specified scheme
-
def
withUser(user: String): Uri
Copies this Uri but with the user set as the given value.
Copies this Uri but with the user set as the given value.
- user
the new user to set
- returns
a new Uri with the specified user