pub(crate) trait ReqwestUrlExt {
// Required method
fn join_rooted(&self, subpaths: &[&str]) -> Result<Url, ParseError>;
}Required Methods§
Sourcefn join_rooted(&self, subpaths: &[&str]) -> Result<Url, ParseError>
fn join_rooted(&self, subpaths: &[&str]) -> Result<Url, ParseError>
Joins the given subpaths, using the current URL as the base URL.
Conceptually, url.join_rooted(&[path]) is very similar to
url.join(path) (using Url::join). However, they differ when
the base URL is a file: URL.
When used with a file: base URL, ReqwestUrlExt::join_rooted
will treat root-relative links as locally-relative links, relative
to the file: base URL.
Other relative links and links with non-file: bases are joined
normally, matching the behaviour of Url::join.