Module Url

Parsed URLs and URL construction helpers.

type Url.Error = String

Error type for URL parsing failures.

type Url = iterative box choice {
  .addQuery => [String, String] self,
  .appendPath => [String] self,
  .full => String,
  .host => String,
  .path => String,
  .protocol => String,
  .query => List<(String) String>,
}

A URL value with inspection operations and derived updates.

  • .full — get the full URL string.
  • .protocol — get the scheme (e.g. "http", "https").
  • .host — get the host, including port if present.
  • .path — get the decoded path.
  • .query — get the query parameters as a list of (key) value pairs.
  • .appendPath(segment) — append a path segment.
  • .addQuery(key, value) — add a query parameter. .appendPath and .addQuery return updated Url values.