sealed abstract case class Uri extends Product with Serializable

An immutable model of an internet URI as defined by http://tools.ietf.org/html/rfc3986. All members of this class represent the *decoded* URI elements (i.e. without percent-encoding).

Source
Uri.scala
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Uri
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def isEmpty: Boolean

Concrete Value Members

  1. val authority: Authority
  2. def copy(scheme: String = scheme, authority: Authority = authority, path: Path = path, rawQueryString: Option[String] = rawQueryString, fragment: Option[String] = fragment): Uri

    Returns a copy of this Uri with the given components.

  3. def effectivePort: Int

    The effective port of this Uri given the currently set authority and scheme values.

    The effective port of this Uri given the currently set authority and scheme values. If the authority has an explicitly set port (i.e. a non-zero port value) then this port is the effective port. Otherwise the default port for the current scheme is returned.

  4. val fragment: Option[String]
  5. def isAbsolute: Boolean
  6. def isRelative: Boolean
  7. val path: Path
  8. def query(charset: Charset = UTF8, mode: ParsingMode = Uri.ParsingMode.Relaxed): Query

    Parses the rawQueryString member into a Query instance.

  9. def queryString(charset: Charset = UTF8): Option[String]

    Returns the query part of the Uri in its decoded form.

  10. val rawQueryString: Option[String]
  11. def resolvedAgainst(base: Uri): Uri

    Returns a new absolute Uri that is the result of the resolution process defined by http://tools.ietf.org/html/rfc3986#section-5.2.2 The given base Uri must be absolute.

  12. val scheme: String
  13. def toEffectiveHttpRequestUri(hostHeaderHost: Host, hostHeaderPort: Int, securedConnection: Boolean = false, defaultAuthority: Authority = Authority.Empty): Uri

    Converts this URI to an "effective HTTP request URI" as defined by http://tools.ietf.org/html/rfc7230#section-5.5

  14. def toEffectiveRequestUri(hostHeaderHost: Host, hostHeaderPort: Int, defaultScheme: String, defaultAuthority: Authority = Authority.Empty): Uri

    Converts this URI to an "effective request URI" as defined by http://tools.ietf.org/html/rfc7230#section-5.5

  15. def toHttpRequestTargetOriginForm: Uri

    Converts this URI into an HTTP request target "origin-form" as defined by https://tools.ietf.org/html/rfc7230#section-5.3.

    Converts this URI into an HTTP request target "origin-form" as defined by https://tools.ietf.org/html/rfc7230#section-5.3.

    Note that the resulting URI instance is not a valid RFC 3986 URI! (As it might be a "relative" URI with a part component starting with a double slash.)

  16. def toRelative: Uri

    Converts this URI into a relative URI by keeping the path, query and fragment, but dropping the scheme and authority.

  17. def toString(): String
    Definition Classes
    Uri → AnyRef → Any
  18. def withAuthority(host: String, port: Int): Uri

    Returns a copy of this Uri with a Authority created using the given host and port.

  19. def withAuthority(host: Host, port: Int, userinfo: String = ""): Uri

    Returns a copy of this Uri with a Authority created using the given host, port and userinfo.

  20. def withAuthority(authority: Authority): Uri

    Returns a copy of this Uri with the given authority.

  21. def withFragment(fragment: String): Uri

    Returns a copy of this Uri with the given fragment.

  22. def withHost(host: String): Uri

    Returns a copy of this Uri with the given host.

  23. def withHost(host: Host): Uri

    Returns a copy of this Uri with the given host.

  24. def withPath(path: Path): Uri

    Returns a copy of this Uri with the given path.

  25. def withPort(port: Int): Uri

    Returns a copy of this Uri with the given port.

  26. def withQuery(query: Query): Uri

    Returns a copy of this Uri with the given query.

  27. def withRawQueryString(rawQuery: String): Uri

    Returns a copy of this Uri with a Query created using the given query string.

  28. def withScheme(scheme: String): Uri

    Returns a copy of this Uri with the given scheme.

    Returns a copy of this Uri with the given scheme. The scheme change of the Uri has the following effect on the port value:

    • If the Uri has a non-default port for the scheme before the change this port will remain unchanged.
    • If the Uri has the default port for the scheme before the change it will have the default port for the new scheme after the change.
  29. def withUserInfo(userinfo: String): Uri

    Returns a copy of this Uri with the given userinfo.

  30. def withoutFragment: Uri

    Drops the fragment from this URI