Packages

sealed trait Url extends Uri

Represents a URL, which will be one of these forms:

  • Absolute: http://example.com
  • Protocol Relative: //example.com
  • Without Authority: mailto:[email protected]
  • Root Relative: /index.html?a=b
  • Rootless Relative: index.html?a=b
  • Rootless Relative (with doc segment): ../index.html?a=b
Linear Supertypes
Uri, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Url
  2. Uri
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract type Self <: Url
    Definition Classes
    UrlUri
  2. abstract type SelfWithAuthority <: UrlWithAuthority
  3. abstract type SelfWithScheme <: Url
    Definition Classes
    UrlUri

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean
    Definition Classes
    Equals
  2. implicit abstract def config: UriConfig
    Definition Classes
    Uri
  3. abstract def fragment: Option[String]
  4. abstract def hostOption: Option[Host]
  5. abstract def longestSubdomain(implicit jsonSupport: JsonSupport): Option[String]

    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

  6. abstract def password: Option[String]
  7. abstract def path: UrlPath
    Definition Classes
    UrlUri
  8. abstract def port: Option[Int]
  9. abstract def productArity: Int
    Definition Classes
    Product
  10. abstract def productElement(n: Int): Any
    Definition Classes
    Product
  11. abstract def publicSuffix(implicit jsonSupport: JsonSupport): 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: com for www.example.com co.uk for www.example.co.uk

    returns

    the longest public suffix for the host in this URI

  12. abstract def publicSuffixes(implicit jsonSupport: JsonSupport): Vector[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: com for www.example.com co.uk and uk for www.example.co.uk

    returns

    all public suffixes for the host in this URI

  13. abstract def query: QueryString
  14. abstract def schemeOption: Option[String]
    Definition Classes
    Uri
  15. abstract def shortestSubdomain(implicit jsonSupport: JsonSupport): Option[String]

    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

  16. abstract def subdomain(implicit jsonSupport: JsonSupport): Option[String]

    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 apex 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

  17. abstract def subdomains(implicit jsonSupport: JsonSupport): Vector[String]

    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

  18. abstract def user: Option[String]
  19. abstract def withAuthority(authority: Authority): SelfWithAuthority

    Copies this Url but with the authority set as the given value.

    Copies this Url but with the authority set as the given value.

    authority

    the authority host to set

    returns

    a new Url with the specified authority

  20. abstract def withFragment(fragment: Option[String]): Self

    Copies this Url but with the fragment set as the given value.

    Copies this Url but with the fragment set as the given value.

    fragment

    the new fragment to set

    returns

    a new Url with the specified fragment

  21. abstract def withHost(host: Host): SelfWithAuthority

    Copies this Url but with the host set as the given value.

    Copies this Url but with the host set as the given value.

    host

    the new host to set

    returns

    a new Url with the specified host

  22. abstract def withPath(path: UrlPath): Self

    Copies this Url but with the path set as the given value.

    Copies this Url but with the path set as the given value.

    path

    the new path to set

    returns

    a new Url with the specified path

  23. abstract def withQueryString(query: QueryString): Self

    Copies this Url but with the query set as the given value.

    Copies this Url but with the query set as the given value.

    query

    the new QueryString to set

    returns

    a new Url with the specified query

  24. abstract def withScheme(scheme: String): SelfWithScheme

    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

    Definition Classes
    Uri

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addParam(kv: (String, String)): Self

    Adds a new Query String parameter key-value pair.

    Adds a new Query String parameter key-value pair.

    kv

    name-value pair for the query parameter to be added

    returns

    A new Url with the new Query String parameter

  5. def addParam(name: String, value: String): Self

    Adds a new Query String parameter key-value pair.

    Adds a new Query String parameter key-value pair.

    name

    name of the parameter

    value

    value for the parameter

    returns

    A new Url with the new Query String parameter

  6. def addParam(name: String, value: Option[String]): Self

    Adds a new Query String parameter key-value pair.

    Adds a new Query String parameter key-value pair.

    Pairs with values, such as Some("value"), represent query params with values, i.e ?param=value

    By default, pairs without values, i.e None, represent query params without values, i.e ?param Using a UriConfig(renderQuery = ExcludeNones), will cause pairs with None values not to be rendered

    name

    name of the parameter

    value

    value for the parameter

    returns

    A new Url with the new Query String parameter

  7. def addParamOptionValue(kv: (String, Option[String])): Self

    Adds a new Query String parameter key-value pair.

    Adds a new Query String parameter key-value pair.

    Pairs with values, such as ("param", Some("value")), represent query params with values, i.e ?param=value

    By default, pairs without values, such as ("param", None), represent query params without values, i.e ?param Using a UriConfig(renderQuery = ExcludeNones), will cause pairs with None values not to be rendered

    kv

    name-value pair for the query parameter to be added

    returns

    A new Url with the new Query String parameter

  8. def addParams(kvs: Iterable[(String, String)]): Self

    Adds all the specified key-value pairs as parameters to the query

    Adds all the specified key-value pairs as parameters to the query

    kvs

    A list of key-value pairs to add as query parameters

    returns

    A new Url with the new Query String parameters

  9. def addParams(kvs: (String, String)*): Self

    Adds all the specified key-value pairs as parameters to the query

    Adds all the specified key-value pairs as parameters to the query

    kvs

    A list of key-value pairs to add as query parameters

    returns

    A new Url with the new Query String parameters

  10. def addParamsOptionValues(kvs: (String, Option[String])*): Self

    Adds all the specified key-value pairs as parameters to the query

    Adds all the specified key-value pairs as parameters to the query

    Pairs with values, such as ("param", Some("value")), represent query params with values, i.e ?param=value

    By default, pairs without values, such as ("param", None), represent query params without values, i.e ?param Using a UriConfig(renderQuery = ExcludeNones), will cause pairs with None values not to be rendered

    kvs

    A list of key-value pairs to add as query parameters

    returns

    A new Url with the new Query String parameters

  11. def addParamsOptionValues(kvs: Iterable[(String, Option[String])]): Self

    Adds all the specified key-value pairs as parameters to the query

    Adds all the specified key-value pairs as parameters to the query

    Pairs with values, such as ("param", Some("value")), represent query params with values, i.e ?param=value

    By default, pairs without values, such as ("param", None), represent query params without values, i.e ?param Using a UriConfig(renderQuery = ExcludeNones), will cause pairs with None values not to be rendered

    kvs

    A list of key-value pairs to add as query parameters

    returns

    A new Url with the new Query String parameters

  12. def addPathPart(part: String): Self
  13. def addPathParts(parts: String*): Self
  14. def addPathParts(parts: Iterable[String]): Self
  15. def apexDomain(implicit jsonSupport: JsonSupport): Option[String]

    Returns the apex domain for this URL.

    Returns the apex domain for this URL.

    The apex domain is constructed from the public suffix for this URL's host prepended with the immediately preceding dot segment.

    Examples include: example.com for www.example.com example.co.uk for www.example.co.uk

    returns

    the apex domain for this URL

  16. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  17. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  18. def collectQuery(f: PartialFunction[(String, Option[String]), (String, Option[String])]): Self

    Transforms the Query String by applying the specified PartialFunction to each Query String Parameter

    Transforms the Query String by applying the specified PartialFunction to each Query String Parameter

    Parameters not defined in the PartialFunction will be removed.

    f

    A function that returns a new Parameter when applied to each Parameter

  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  21. def filterQuery(f: ((String, Option[String])) => Boolean): Self

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

  22. def filterQueryNames(f: (String) => Boolean): Self

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

  23. def filterQueryValues(f: (String) => Boolean): Self

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

  24. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  25. def flatMapQuery(f: ((String, Option[String])) => Iterable[(String, Option[String])]): Self

    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

  26. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. def mapQuery(f: PartialFunction[(String, Option[String]), (String, Option[String])]): Self

    Transforms the Query String by applying the specified PartialFunction to each Query String Parameter

    Transforms the Query String by applying the specified PartialFunction to each Query String Parameter

    Parameters not defined in the PartialFunction will be left as-is.

    f

    A function that returns a new Parameter when applied to each Parameter

  30. def mapQueryNames(f: (String) => String): Self

    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

  31. def mapQueryValues(f: (String) => String): Self

    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

  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. def productElementName(n: Int): String
    Definition Classes
    Product
  36. def productElementNames: Iterator[String]
    Definition Classes
    Product
  37. def productIterator: Iterator[Any]
    Definition Classes
    Product
  38. def productPrefix: String
    Definition Classes
    Product
  39. def removeParams(k: Iterable[String]): Self

    Removes all Query String parameters with a name in the specified list

    Removes all Query String parameters with a name in the specified list

    k

    Names of Query String parameter(s) to remove

  40. def removeParams(k: String*): Self

    Removes all Query String parameters with a name in the specified list

    Removes all Query String parameters with a name in the specified list

    k

    Names of Query String parameter(s) to remove

  41. def removeParams(k: String): Self

    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

  42. def removeQueryString(): Self

    Removes all Query String parameters

  43. def replaceParams(k: String, v: String): Self

    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.

    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

  44. def replaceParams(k: String, v: Option[String]): Self

    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.

    Pairs with values, such as ("param", Some("value")), represent query params with values, i.e ?param=value

    By default, pairs without values, such as ("param", None), represent query params without values, i.e ?param Using a UriConfig(renderQuery = ExcludeNones), will cause pairs with None values not to be rendered

    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

  45. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  46. def toAbsoluteUrl: AbsoluteUrl
  47. def toJavaURI: URI

    Converts to a java.net.URI

    Converts to a java.net.URI

    This involves a toString and URI.parse because the specific java.net.URI constructors do not deal properly with encoded elements

    returns

    a java.net.URI matching this io.lemonlabs.uri.Uri

    Definition Classes
    Uri
  48. def toProtocolRelativeUrl: ProtocolRelativeUrl
  49. def toRelativeUrl: RelativeUrl
  50. def toString(): String
    Definition Classes
    Uri → AnyRef → Any
  51. def toStringPunycode: String

    returns

    the URL as a String. If the URI has a domain name for a host, any unicode characters will be returned in ASCII Compatible Encoding (ACE), as defined by the ToASCII operation of RFC 3490.

  52. def toStringRaw: 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

    Definition Classes
    Uri
  53. def toUrl: Url
    Definition Classes
    UrlUri
  54. def toUrn: Urn
    Definition Classes
    UrlUri
  55. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  56. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  58. def withFragment(fragment: String): Self

    Copies this Url but with the fragment set as the given value.

    Copies this Url but with the fragment set as the given value.

    fragment

    the new fragment to set

    returns

    a new Url with the specified fragment

  59. def withHost(host: String): SelfWithAuthority

    Copies this Url but with the host set as the given value.

    Copies this Url but with the host set as the given value.

    host

    the new host to set

    returns

    a new Url with the specified host

  60. def withQueryString(params: (String, String)*): Self

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

  61. def withQueryStringOptionValues(params: (String, Option[String])*): Self

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

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

    Pairs with values, such as ("k", Some("v")), represent query params with values, i.e ?k=v Pairs without values, such as ("k", None), represent query params without values, i.e ?k

Inherited from Uri

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped