fn main() {
let my_id = "xmlrpc_example"; let server_uri = "http://localhost:11311"; let client = reqwest::blocking::Client::new();
let body = serde_xmlrpc::request_to_string("getTopicTypes", vec![my_id.into()]).unwrap();
let response = client
.post(server_uri)
.body(body)
.send()
.unwrap()
.text()
.unwrap();
let (_status_code, _error_msg, topics) =
serde_xmlrpc::response_from_str::<(i8, String, Vec<(String, String)>)>(&response).unwrap();
println!("Ros reported the following registered topics and types: {topics:?}");
}