gossamer/url
Types
Values
pub fn can_parse(url: String) -> Bool
Returns a boolean value indicating if a URL string is valid and can be parsed.
pub fn can_parse_with_base(url: String, base: String) -> Bool
Returns a boolean value indicating if a URL string with a base is valid and can be parsed.
pub fn new(url: String) -> Result(URL, String)
Creates a new URL object by parsing the specified URL string. Returns an error if the URL is invalid.
pub fn new_with_base(
url: String,
base: String,
) -> Result(URL, String)
Creates a new URL object by parsing the specified URL string with a base URL. Returns an error if the URL is invalid.
pub fn parse(url: String) -> Result(URL, Nil)
Parses a URL string and returns a URL object, or an error if invalid.
pub fn parse_with_base(
url: String,
base: String,
) -> Result(URL, Nil)
Parses a URL string relative to a base URL and returns a URL object, or an error if invalid.
pub fn search_params(
url: URL,
) -> url_search_params.URLSearchParams