```rust use nacos_api::{NacosClient, NacosConfig, ServerConfig};
async fn main() { let client = NacosClient::new( NacosConfig::new( "http", "192.168.0.132", 8848, ), ServerConfig::new( "127.0.0.1", 8080, "test", ), ); client.register(&None).await; loop {} } ```
```rust pub async fn tryreqserver() { use nacos_api::{NacosClient, NacosConfig, ServerConfig};
let client = NacosClient::new(
NacosConfig::new(
"http",
"192.168.0.132",
8848),
ServerConfig::new(
"127.0.0.1",
8080,
"test"),
);
let addr = client.get_addr_simple("test", "/hi/friend").await?;
assert!("http://127.0.0.1:8080/hi/friend", addr.as_str());
} ```