std::net::url

Url

struct Url(Printable)
{
	String scheme;
	String host;
	uint   port;
	String username;
	String password;
	String path;
	String query;
	String fragment;

	Allocator allocator;
}
Represents the actual (decoded) Url.

An Url can be parsed from a String with `new_parse()` or `temp_parse()`. The
parsed fields are decoded. The only field that is not decoded is `query`.
To access the decoded query values, use `new_parse_query(query)`.

`Url.to_string()` will re-assemble the fields into a valid Url string with
proper percent-encoded values.

If the Url struct fields are filled in manually, use the actual (un-encoded)
values. To create a raw query string, initialize an `UrlQueryValues` map, use
`UrlQueryValues.add()` to add the query parameters and, finally, call
`UrlQueryValues.to_string()`.

Members

Methods