Add method `admin_service_client_with_auth`
This method takes an `auth` argument, the string given in the auth arg
is passed to the `ReqwestAdminServiceClient` that is created in this
method. The `ReqwestAdminServiceClient` will use the auth string in
the authorization header when making requests to the REST API.
@@ -92,6 +92,16 @@ impl Node {
))
}
+ pub fn admin_service_client_with_auth(
+ self: &Node,
+ auth: String,
+ ) -> Box<dyn AdminServiceClient> {
+ Box::new(ReqwestAdminServiceClient::new(
+ format!("http://localhost:{}", self.rest_api_port),
+ auth,
+ ))
+ }
+
pub fn admin_service_event_client(
&self,
event_type: &str,
