File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,19 @@ impl VssClient {
2020 /// Constructs a [`VssClient`] using `base_url` as the VSS server endpoint.
2121 pub fn new ( base_url : & str ) -> Self {
2222 let client = Client :: new ( ) ;
23+ Self :: from_client ( base_url, client)
24+ }
25+
26+ /// Constructs a [`VssClient`] from a given [`reqwest::Client`], using `base_url` as the VSS server endpoint.
27+ pub fn from_client ( base_url : & str , client : Client ) -> Self {
2328 Self { base_url : String :: from ( base_url) , client }
2429 }
2530
31+ /// Returns the underlying base URL.
32+ pub fn base_url ( & self ) -> & str {
33+ & self . base_url
34+ }
35+
2636 /// Fetches a value against a given `key` in `request`.
2737 /// Makes a service call to the `GetObject` endpoint of the VSS server.
2838 /// For API contract/usage, refer to docs for [`GetObjectRequest`] and [`GetObjectResponse`].
You can’t perform that action at this time.
0 commit comments