Class/Object

com.netaporter.uri

Uri

Related Docs: object Uri | package uri

Permalink

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], pathStartsWithSlash: Boolean) extends SubdomainSupport with Product with Serializable

http://tools.ietf.org/html/rfc3986

Linear Supertypes
Serializable, Serializable, Product, Equals, SubdomainSupport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Uri
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. SubdomainSupport
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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], pathStartsWithSlash: Boolean)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addParam(kv: Param): Uri

    Permalink
  5. def addParam(name: String, value: Any): Uri

    Permalink

    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

  6. def addParams(kvs: Map[String, Any]): Uri

    Permalink
  7. def addParams(kvs: Seq[(String, Any)]): Uri

    Permalink
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def filterQuery(f: (Param) ⇒ Boolean): Uri

    Permalink

    Removes any Query String Parameters that return false when applied to the given Function

  12. def filterQueryNames(f: (String) ⇒ Boolean): Uri

    Permalink

    Removes any Query String Parameters that return false when their name is applied to the given Function

  13. def filterQueryValues(f: (String) ⇒ Boolean): Uri

    Permalink

    Removes any Query String Parameters that return false when their value is applied to the given Function

  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def flatMapQuery(f: (Param) ⇒ GenTraversableOnce[Param]): Uri

    Permalink

    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

  16. val fragment: Option[String]

    Permalink
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. val host: Option[String]

    Permalink
  19. lazy val hostParts: Seq[String]

    Permalink
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def longestSubdomain: Option[String]

    Permalink

    Returns the longest subdomain for this URL's host.

    Returns the longest subdomain for this URL's host. E.g. for http://a.b.c.example.com returns a.b.c.example

    returns

    the longest subdomain for this URL's host

    Definition Classes
    SubdomainSupport
  22. def mapQuery(f: (Param) ⇒ Param): Uri

    Permalink

    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

  23. def mapQueryNames(f: (String) ⇒ String): Uri

    Permalink

    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

  24. def mapQueryValues(f: (String) ⇒ String): Uri

    Permalink

    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

  25. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. val password: Option[String]

    Permalink
  29. def path(implicit c: UriConfig = UriConfig.default): String

    Permalink

    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

  30. def pathPart(name: String): PathPart

    Permalink
  31. def pathPartOption(name: String): Option[PathPart]

    Permalink
  32. val pathParts: Seq[PathPart]

    Permalink
  33. def pathRaw(implicit c: UriConfig = UriConfig.default): String

    Permalink

    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

  34. val pathStartsWithSlash: Boolean

    Permalink
  35. val port: Option[Int]

    Permalink
  36. def protocol: Option[String]

    Permalink
  37. def publicSuffix: Option[String]

    Permalink

    Returns the longest public suffix for the host in this URI.

    Returns the longest public suffix for the host in this URI. Examples include: com for www.example.com co.uk for www.example.co.uk

    returns

    the longest public suffix for the host in this URI

  38. def publicSuffixes: Seq[String]

    Permalink

    Returns all longest public suffixes for the host in this URI.

    Returns all longest public suffixes for the host in this URI. Examples include: com for www.example.com co.uk and uk for www.example.co.uk

    returns

    all public suffixes for the host in this URI

  39. val query: QueryString

    Permalink
  40. def queryString(implicit c: UriConfig = UriConfig.default): String

    Permalink
  41. def queryStringRaw(implicit c: UriConfig = UriConfig.default): String

    Permalink
  42. def removeAllParams(): Uri

    Permalink

    Removes all Query String parameters

  43. def removeParams(a: Seq[String]): Uri

    Permalink

    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

  44. def removeParams(k: String): Uri

    Permalink

    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

  45. def replaceAllParams(params: Param*): Uri

    Permalink

    Replaces the all existing Query String parameters with a new set of query params

  46. def replaceParams(k: String, v: Any): Uri

    Permalink

    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

  47. val scheme: Option[String]

    Permalink
  48. def shortestSubdomain: Option[String]

    Permalink

    Returns the shortest subdomain for this URL's host.

    Returns the shortest subdomain for this URL's host. E.g. for http://a.b.c.example.com returns a

    returns

    the shortest subdomain for this URL's host

    Definition Classes
    SubdomainSupport
  49. def subdomain: Option[String]

    Permalink

    Returns the second largest subdomain for this URL's host.

    Returns the second largest subdomain for this URL's host.

    E.g. for http://a.b.c.example.com returns a.b.c

    Note: In the event there is only one subdomain (i.e. the host is the root domain), this method returns None. E.g. This method will return None for http://example.com.

    returns

    the second largest subdomain for this URL's host

    Definition Classes
    SubdomainSupport
  50. def subdomains: Seq[String]

    Permalink

    Returns all subdomains for this URL's host.

    Returns all subdomains for this URL's host. E.g. for http://a.b.c.example.com returns a, a.b, a.b.c and a.b.c.example

    returns

    all subdomains for this URL's host

    Definition Classes
    SubdomainSupport
  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  52. def toString(implicit c: UriConfig = UriConfig.default): String

    Permalink
  53. def toString(): String

    Permalink
    Definition Classes
    Uri → AnyRef → Any
  54. def toStringRaw(implicit config: UriConfig = UriConfig.default): String

    Permalink

    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

  55. def toURI(implicit c: UriConfig = UriConfig.conservative): URI

    Permalink

    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

  56. val user: Option[String]

    Permalink
  57. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. def withFragment(fragment: String): Uri

    Permalink

    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

  61. def withHost(host: String): Uri

    Permalink

    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

  62. def withPassword(password: String): Uri

    Permalink

    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

  63. def withPort(port: Int): Uri

    Permalink

    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

  64. def withScheme(scheme: String): Uri

    Permalink

    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

  65. def withUser(user: String): Uri

    Permalink

    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

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from SubdomainSupport

Inherited from AnyRef

Inherited from Any

Ungrouped