Skip to content

URIAuthority

[Source]

A parsed URI authority component (RFC 3986 section 3.2).

Format: [userinfo@]host[:port]

The host may be empty — this occurs in URIs like file:///path where the authority is present (indicated by //) but contains no host. IP-literals (IPv6 and IPvFuture) include their brackets in the host string (e.g., [::1]).

class val URIAuthority is
  Stringable box,
  Equatable[URIAuthority val] ref

Implements


Constructors

create

[Source]

Build an authority from pre-encoded components.

The userinfo and host strings must already be percent-encoded — no encoding is applied here. Most callers will obtain a URIAuthority from ParseURI or ParseURIAuthority.

new val create(
  userinfo': (String val | None val),
  host': String val,
  port': (U16 val | None val))
: URIAuthority val^

Parameters

Returns


Public fields

let userinfo: (String val | None val)

[Source]


let host: String val

[Source]


let port: (U16 val | None val)

[Source]


Public Functions

string

[Source]

Reconstruct the authority string in [userinfo@]host[:port] format.

fun box string()
: String iso^

Returns


eq

[Source]

Structural equality on all authority components.

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

Parameters

Returns


ne

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

Parameters

Returns