use crate::hwinfo::PhysicalHost; pub async fn get_host_inventory(host: &str, port: u16) -> Result { let url = format!("http://{host}:{port}/inventory"); let client = reqwest::Client::new(); let response = client .get(url) .send() .await .map_err(|e| format!("Failed to download file: {e}"))?; let host = response.json().await.map_err(|e| e.to_string())?; Ok(host) }