Skip to main content

URI

Represents a Uniform Resource Identifier (URI).

class URI
info

None. This class cannot be instantiated directly. Use parse_uri or parse_uri_list to obtain instances.

Properties

has_fragment

has_fragment: Bool { get }

Whether the URI has a fragment component.


has_port

has_port: Bool { get }

Whether the URI has a port component.


has_query

has_query: Bool { get }

Whether the URI has a query component.


has_scheme

has_scheme: Bool { get }

Whether the URI has a scheme component.


scheme

scheme: String { get }

The scheme component (e.g. https, file).


host

host: String { get }

The host component.


port

port: String { get }

The port component as a string.


path

path: String { get }

The path component.


query

query: String { get }

The query component (without the leading ?).


fragment

fragment: String { get }

The fragment component (without the leading #).

Methods

equal

equal(to other: URI) -> (Bool)

Returns whether the URI compares equal to other.


to_string

to_string() -> (String)

Returns the full URI as a string.