Skip to main content

normalize_url

Function normalize_url 

Source
pub fn normalize_url(url: &str) -> Result<String, String>
Expand description

Normalize URL to ensure it’s absolute.

Prepends https:// if no scheme is present and validates the URL.

§Errors

Returns an error string if the URL is empty or invalid.