object Uri extends Serializable
- Alphabetic
- By Inheritance
- Uri
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class Authority(host: Host, port: Int = 0, userinfo: String = "") extends javadsl.model.Authority with Product with Serializable
- port
A port number that may be
0
to signal the default port of for scheme. In general what you want is not the value of this field but Uri.effectivePort.- userinfo
The percent decoded userinfo. According to https://tools.ietf.org/html/rfc3986#section-3.2.1 the "user:password" syntax is deprecated and implementations are encouraged to ignore any characters after the colon (
:
). Therefore, it is not guaranteed that future versions of this class will preserve full userinfo between parsing and rendering (even if it might do so right now).
- sealed abstract class Host extends javadsl.model.Host
- final case class IPv4Host extends NonEmptyHost with Product with Serializable
- final case class IPv6Host extends NonEmptyHost with Product with Serializable
- final case class NamedHost(address: String) extends NonEmptyHost with Product with Serializable
- sealed abstract class NonEmptyHost extends Host
- sealed trait ParsingMode extends javadsl.model.Uri.ParsingMode
- sealed abstract class Path extends AnyRef
- sealed abstract class Query extends QuerySeqOptimized
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- val /: Uri
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(scheme: String = "", authority: Authority = Authority.Empty, path: Path = Path.Empty, queryString: Option[String] = None, fragment: Option[String] = None): Uri
Creates a new Uri instance from the given components.
Creates a new Uri instance from the given components. All components are verified and normalized except the authority which is kept as provided. If the given combination of components does not constitute a valid URI as defined by http://tools.ietf.org/html/rfc3986 the method throws an
IllegalUriException
.- queryString
percent-encoded query string. When characters are encountered that are outside of the RFC3986 range they are automatically percent-encoded
- def apply(input: ParserInput, charset: Charset, mode: ParsingMode): Uri
Parses a valid URI string into a normalized URI reference as defined by http://tools.ietf.org/html/rfc3986#section-4.1.
Parses a valid URI string into a normalized URI reference as defined by http://tools.ietf.org/html/rfc3986#section-4.1. Percent-encoded octets are decoded using the given charset (where specified by the RFC). If the given string is not a valid URI the method throws an
IllegalUriException
.- mode
if
Relaxed
, accepts unencoded visible 7-bit ASCII characters in addition to the RFC.
- def apply(input: ParserInput, mode: ParsingMode): Uri
Parses a valid URI string into a normalized URI reference as defined by http://tools.ietf.org/html/rfc3986#section-4.1.
Parses a valid URI string into a normalized URI reference as defined by http://tools.ietf.org/html/rfc3986#section-4.1. Percent-encoded octets are decoded using the given charset (where specified by the RFC). If the given string is not a valid URI the method throws an
IllegalUriException
.- mode
if
Relaxed
, accepts unencoded visible 7-bit ASCII characters in addition to the RFC.
- def apply(input: ParserInput): Uri
Parses a valid URI string into a normalized URI reference as defined by http://tools.ietf.org/html/rfc3986#section-4.1.
Parses a valid URI string into a normalized URI reference as defined by http://tools.ietf.org/html/rfc3986#section-4.1. Percent-encoded octets are decoded using the given charset (where specified by the RFC). Accepts unencoded visible 7-bit ASCII characters in addition to the rfc. If the given string is not a valid URI the method throws an
IllegalUriException
. - implicit def apply(input: String): Uri
Parses a valid URI string into a normalized URI reference as defined by http://tools.ietf.org/html/rfc3986#section-4.1.
Parses a valid URI string into a normalized URI reference as defined by http://tools.ietf.org/html/rfc3986#section-4.1. Percent-encoded octets are UTF-8 decoded. Accepts unencoded visible 7-bit ASCII characters in addition to the RFC. If the given string is not a valid URI the method throws an
IllegalUriException
. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def effectiveHttpRequestUri(scheme: String, host: Host, port: Int, path: Path, query: Option[String], fragment: Option[String], securedConnection: Boolean, hostHeaderHost: Host, hostHeaderPort: Int, defaultAuthority: Authority = Authority.Empty): Uri
Converts a set of URI components to an "effective HTTP request URI" as defined by http://tools.ietf.org/html/rfc7230#section-5.5.
- def effectiveRequestUri(scheme: String, host: Host, port: Int, path: Path, query: Option[String], fragment: Option[String], defaultScheme: String, hostHeaderHost: Host, hostHeaderPort: Int, defaultAuthority: Authority = Authority.Empty): Uri
Converts a set of URI components to an "effective request URI" as defined by http://tools.ietf.org/html/rfc7230#section-5.5.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def from(scheme: String = "", userinfo: String = "", host: String = "", port: Int = 0, path: String = "", queryString: Option[String] = None, fragment: Option[String] = None, mode: ParsingMode = Uri.ParsingMode.Relaxed): Uri
Creates a new Uri instance from the given components.
Creates a new Uri instance from the given components. All components are verified and normalized. If the given combination of components does not constitute a valid URI as defined by http://tools.ietf.org/html/rfc3986 the method throws an
IllegalUriException
. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def httpScheme(securedConnection: Boolean = false): String
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def normalize(uri: ParserInput, charset: Charset = UTF8, mode: ParsingMode = Uri.ParsingMode.Relaxed): String
Normalizes the given URI string by performing the following normalizations:
Normalizes the given URI string by performing the following normalizations:
- the
scheme
andhost
components are converted to lowercase - a potentially existing
port
component is removed if it matches one of the defined default ports for the scheme - percent-encoded octets are decoded if allowed, otherwise they are converted to uppercase hex notation
.
and..
path segments are resolved as far as possible
If the given string is not a valid URI the method throws an
IllegalUriException
.- mode
if
Relaxed
, accepts unencoded visible 7-bit ASCII characters in addition to the RFC.
- the
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def parseAbsolute(input: ParserInput, charset: Charset = UTF8, mode: ParsingMode = Uri.ParsingMode.Relaxed): Uri
Parses a string into a normalized absolute URI as defined by http://tools.ietf.org/html/rfc3986#section-4.3.
Parses a string into a normalized absolute URI as defined by http://tools.ietf.org/html/rfc3986#section-4.3. Percent-encoded octets are decoded using the given charset (where specified by the RFC). If the given string is not a valid URI the method throws an
IllegalUriException
.- mode
if
Relaxed
, accepts unencoded visible 7-bit ASCII characters in addition to the RFC.
- def parseAndResolve(string: ParserInput, base: Uri, charset: Charset = UTF8, mode: ParsingMode = Uri.ParsingMode.Relaxed): Uri
Parses a string into a normalized URI reference that is immediately resolved against the given base URI as defined by http://tools.ietf.org/html/rfc3986#section-5.2.
Parses a string into a normalized URI reference that is immediately resolved against the given base URI as defined by http://tools.ietf.org/html/rfc3986#section-5.2. Note that the given base Uri must be absolute (i.e. define a scheme). Percent-encoded octets are decoded using the given charset (where specified by the RFC). If the given string is not a valid URI the method throws an
IllegalUriException
.- mode
if
Relaxed
, accepts unencoded visible 7-bit ASCII characters in addition to the RFC.
- def parseHttpRequestTarget(requestTarget: ParserInput, charset: Charset = UTF8, mode: ParsingMode = Uri.ParsingMode.Relaxed): Uri
Parses the given string into an HTTP request target URI as defined by http://tools.ietf.org/html/rfc7230#section-5.3.
Parses the given string into an HTTP request target URI as defined by http://tools.ietf.org/html/rfc7230#section-5.3. If the given string is not a valid URI the method throws an
IllegalUriException
.- mode
if
Relaxed
, accepts unencoded visible 7-bit ASCII characters in addition to the RFC.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def websocketScheme(securedConnection: Boolean = false): String
- object Authority extends Serializable
- object Empty extends Uri
- object Host
- object IPv4Host extends Serializable
- object IPv6Host extends Serializable
- object ParsingMode
- object Path
- object Query