Skip to content

UrlQuery

1 min read

Import: import system.net;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

UrlQuery

Ordered form-decoded URL query parameters. Mutations use form encoding (+ for space).

public class UrlQuery

length

Number of key/value pairs, including repeated keys and empty values.

public get length(): int

append

Appends a decoded key/value pair after existing parameters.

public fun append(key: string, value: string): void

get

Returns the first decoded value for key, or None if the key is absent.

public fun get(key: string): Option<string>

get_all

Copies all decoded values for key in their original order.

public fun get_all(key: string): string[]

set

Replaces the first occurrence in place and removes later duplicates; appends if absent.

public fun set(key: string, value: string): void

remove

Removes every occurrence of key, preserving the order of remaining pairs.

public fun remove(key: string): void

clear

Removes all parameters and the query delimiter from the URL.

public fun clear(): void