pub(crate) async fn with_node_pool_urls(mut self, node_pool_urls: &[String]) -> Result<Self> {
        for pool_url in node_pool_urls {
            let http_client = crate::node_manager::HttpClient::new();
            let nodes_details: Vec<NodeDetail> = http_client
                .get(
                    Node {
                        url: validate_url(Url::parse(pool_url)?)?,
                        jwt: None,
                    },
                    crate::builder::GET_API_TIMEOUT,
                )
                .await?
                .json()
                .await?;
            for node_detail in nodes_details {
                let url = validate_url(Url::parse(&node_detail.node)?)?;
                self.nodes.insert(Node { url, jwt: None });
            }
        }
        Ok(self)
    }
/// Get node list from the node_pool_urls
Get node list from the node_pool_urls
Get node list from the node_pool_urls
pub(crate) async fn with_node_pool_urls(mut self, node_pool_urls: &[String]) -> Result<Self> {
        for pool_url in node_pool_urls {
            let http_client = crate::node_manager::HttpClient::new();
            let nodes_details: Vec<NodeDetail> = http_client
                .get(
                    Node {
                        url: validate_url(Url::parse(pool_url)?)?,
                        jwt: None,
                    },
                    crate::builder::GET_API_TIMEOUT,
                )
                .await?
                .json()
                .await?;
            for node_detail in nodes_details {
                let url = validate_url(Url::parse(&node_detail.node)?)?;
                self.nodes.insert(Node { url, jwt: None });
            }
        }
        Ok(self)
    }
pub ( crate ) async fn with_node_pool_urls ( mut self , node_pool_urls : & [ String ] ) -> Result < Self > { for pool_url in node_pool_urls { let http_client = crate :: node_manager :: HttpClient :: new ( ) ; let nodes_details : Vec < NodeDetail > = http_client . get ( Node { url : validate_url ( Url :: parse ( pool_url ) ? ) ? , jwt : None , } , crate :: builder :: GET_API_TIMEOUT , ) . await ? . json ( ) . await ? ; for node_detail in nodes_details { let url = validate_url ( Url :: parse ( & node_detail . node ) ? ) ? ; self . nodes . insert ( Node { url , jwt : None } ) ; } } Ok ( self ) }
Get node list from the node_pool_urls
Get node list from the node_pool_urls
mut self
node_pool_urls
&[String]
mut self
node_pool_urls
&[String]