From 18cebdfedc7b3001e754bc41d0fa977ac7def770 Mon Sep 17 00:00:00 2001 From: Tommy Verrall Date: Mon, 20 Oct 2025 14:33:57 +0200 Subject: [PATCH] Add accessor methods for Url internals Add inner_url() and fronts() accessor methods to nym_http_api_client::Url for VPN client integration --- common/http-api-client/src/url.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/http-api-client/src/url.rs b/common/http-api-client/src/url.rs index d964a6a3f4..e0aafbdd4c 100644 --- a/common/http-api-client/src/url.rs +++ b/common/http-api-client/src/url.rs @@ -191,6 +191,16 @@ impl Url { false } + /// Returns the inner `url::Url` reference + pub fn inner_url(&self) -> &url::Url { + &self.url + } + + /// Returns the front URLs if configured + pub fn fronts(&self) -> Option<&Vec> { + self.fronts.as_ref() + } + /// Return the string representation of the current front host (domain or IP address) for this /// URL, if any. pub fn front_str(&self) -> Option<&str> {