A URL parsed as the WHATWG URL standard parses one, as new URL() does in
JavaScript, so every port reads a request's address the same way.
Documented for its type; its functions are internal and can change in any release.
Summary
Functions
Percent-encodes C0 controls, DEL, bytes past ASCII, and the extra characters; escapes already there stay.
url.host: the hostname, with the port when there is one.
url.href, which toString() gives too.
new URL(input, base), raising ArgumentError as the constructor throws.
url.origin.
new URL(input, base), or nil where it throws.
Assigning url.pathname.
Assigning url.search: one leading ? is dropped and the rest percent-encoded; empty removes it.
url.searchParams.
The URL with these parameters as its query, as changing url.searchParams does.
Types
Functions
Percent-encodes C0 controls, DEL, bytes past ASCII, and the extra characters; escapes already there stay.
url.host: the hostname, with the port when there is one.
url.href, which toString() gives too.
new URL(input, base), raising ArgumentError as the constructor throws.
url.origin.
new URL(input, base), or nil where it throws.
Assigning url.pathname.
Assigning url.search: one leading ? is dropped and the rest percent-encoded; empty removes it.
@spec search_params(t()) :: Runlight.SearchParams.t()
url.searchParams.
@spec with_params(t(), Runlight.SearchParams.t()) :: t()
The URL with these parameters as its query, as changing url.searchParams does.