pub fn parse_url(url: &str) -> Result<UrlParts, NetError>Expand description
Parse a scheme://host[:port][/path] URL.
Extracted from sim-lib-agent-runner-http’s parse_url. Differences from
that internal helper, which are intentional for a shared primitive:
- Default ports are resolved here for
http(80) andhttps(443); any other scheme is rejected withNetError::UnsupportedSchemewhen no explicit port is given. (The client only usedhttp/https.) - The path defaults to
/instead of the empty string when absent, so the result is a usable request target on its own.