diff --git a/common/http-api-client/src/url.rs b/common/http-api-client/src/url.rs index d964a6a3f4..8b3b1a65b8 100644 --- a/common/http-api-client/src/url.rs +++ b/common/http-api-client/src/url.rs @@ -183,6 +183,11 @@ impl Url { }) } + /// Returns the underlying URL + pub fn inner_url(&self) -> &url::Url { + &self.url + } + /// Returns true if the URL has a front domain set pub fn has_front(&self) -> bool { if let Some(fronts) = &self.fronts { @@ -201,6 +206,11 @@ impl Url { .and_then(|url| url.host_str()) } + /// Returns the fronts + pub fn fronts(&self) -> Option<&[url::Url]> { + self.fronts.as_deref() + } + /// Return the string representation of the host (domain or IP address) for this URL, if any. pub fn host_str(&self) -> Option<&str> { self.url.host_str()