class UrlOrigin
source · line 68public
public class UrlOrigin internal constructor(
/**
* The normalized HTTP or HTTPS scheme.
*/
public val scheme: String,
/**
* The normalized DNS or IP host used for origin equality.
*/
public val host: UrlHost,
/**
* The effective network port, including the scheme default when omitted.
*/
public val port: Int
) : Equals<UrlOrigin>, Hash, ToString
- Supertype
Equals<UrlOrigin> - Supertype
Hash - Supertype
ToString
An HTTP origin identified by normalized scheme, DNS name or IP bytes, and effective port.
function authority
source · line 93public
public fun authority(includeDefaultPort: Boolean = false): String
Serializes the host and port, omitting the scheme default unless explicitly requested.
parameter includeDefaultPort
source · line 93public
includeDefaultPort: Boolean = false
property port
source · line 80public
public val port: Int
get: public read-only
The effective network port, including the scheme default when omitted.
function toString
source · line 98public
public override fun toString(): String
- Overrides
toString
Serializes the scheme and normalized origin authority.
property scheme
source · line 72public
public val scheme: String
get: public read-only
The normalized HTTP or HTTPS scheme.
function equals
source · line 85public
public override operator fun equals(other: UrlOrigin): Boolean
- Overrides
equals
Compares scheme, normalized host, and effective port.
parameter other
source · line 85public
other: UrlOrigin
function hash
source · line 89public
public override fun hash(): Long
- Overrides
hash
Hashes the same scheme, host, and port used by equality.
property host
source · line 76public
public val host: UrlHost
get: public read-only
The normalized DNS or IP host used for origin equality.