Skip to main content

url_host_str

Function url_host_str 

Source
pub fn url_host_str(url: &Url) -> String
Expand description

Get the host of a URL as a string for display purposes (e.g., warning headers).

This returns the host portion as a string, or “unknown” if not available. Used in places like HTTP Warning headers where we need a displayable host value.