Skip to content

ParseURI

[Source]

Parse a URI-reference (RFC 3986 section 4.1) into structured components.

Handles both absolute URIs (http://host/path?query) and relative references (/path?query). Components are stored percent-encoded.

The parsing algorithm follows RFC 3986 section 3: scan for : before any of /?# to identify the scheme, then check for // to identify authority, then extract path (up to ? or #), query (between ? and #), and fragment (after #). Scanning operates on literal delimiter characters only — percent-encoded delimiters (%2F, %3F, %23) are not treated as structural boundaries.

Scheme validation: the scheme must start with a letter and contain only letters, digits, +, -, and . (RFC 3986 section 3.1).

The asterisk-form (*) used by HTTP OPTIONS is a valid relative reference under RFC 3986 — it parses as a URI with path * and no other components.

primitive val ParseURI

Constructors

create

[Source]

new val create()
: ParseURI val^

Returns


Public Functions

apply

[Source]

fun box apply(
  raw: String val)
: (URI val | InvalidPort val | InvalidHost val)

Parameters

Returns


eq

[Source]

fun box eq(
  that: ParseURI val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: ParseURI val)
: Bool val

Parameters

Returns