Scoop API

scoop:scoop.url:0.1.0

Url

class Url

source · line 10
public
public class Url internal constructor(
    /**
     * The normalized scheme, or None for a relative reference.
     */
    public val scheme: String?,
    /**
         * The parsed authority when the reference contains one.
         */
    public val authority: UrlAuthority?,
    /**
     * The percent-encoded path, retaining reserved characters as structural data.
     */
    public val encodedPath: String,
    /**
         * The encoded query without the leading question mark; None differs from an empty query.
         */
    public val encodedQuery: String?,
    /**
         * The encoded fragment without the leading hash; None differs from an empty fragment.
         */
    public val encodedFragment: String?,
    private val serialized: String
) : Equals<Url>, Compare<Url>, Hash, ToString

An immutable URI/IRI reference. Parsing accepts relative references and non-HTTP schemes without network I/O. Equality and ordering use normalized ASCII serialization; parsing follows a strict profile without browser-style recovery.

property encodedFragment

source · line 30
public
public val encodedFragment: String?

get: public read-only

The encoded fragment without the leading hash; None differs from an empty fragment.

function resolve

source · line 58
public
public fun resolve(reference: Url): Url

Resolves a relative reference against this URL using URI reference-resolution rules.

property authority

source · line 18
public
public val authority: UrlAuthority?

get: public read-only

The parsed authority when the reference contains one.

property scheme

source · line 14
public
public val scheme: String?

get: public read-only

The normalized scheme, or None for a relative reference.

property encodedPath

source · line 22
public
public val encodedPath: String

get: public read-only

The percent-encoded path, retaining reserved characters as structural data.

function queryParameters

source · line 120
public
public fun queryParameters(): UrlQuery

Parses the encoded query as ordered parameters, with ordinary URI plus semantics.

property encodedQuery

source · line 26
public
public val encodedQuery: String?

get: public read-only

The encoded query without the leading question mark; None differs from an empty query.

function toIriString

source · line 132
public
public fun toIriString(): String

Returns a display-oriented IRI, retaining escapes for reserved characters such as encoded slashes.

function httpRequestTarget

source · line 92
public
public fun httpRequestTarget(): String

Returns origin-form path and query, excluding user information and fragment.

function httpOrigin

source · line 73
public
public fun httpOrigin(): UrlOrigin

Validates an HTTP or HTTPS network target and computes its normalized host and effective port. Invalid DNS names, compatibility numeric addresses, port zero, and IPvFuture are rejected.

function httpAbsoluteTarget

source · line 112
public
public fun httpAbsoluteTarget(): String

Returns the absolute HTTP request target for a proxy, excluding user information and fragment.

function hash

source · line 49
public
public override fun hash(): Long

Hashes the same normalized serialization used by equality.