Hi, I would like to gather info from my canisters using the Rust agent by calling canister_status using the management canister but here is what I get as a response :
`The replica returned an HTTP Error: Http Error: status 404 Not Found, content type “text/html”, content:
404 Not Found404 Not Found
nginx/1.21.3 `
Using the interface spec from here :
canister_status : (record {canister_id : principal}) → (record {
status : variant { running; stopping; stopped };
settings: definite_canister_settings;
module_hash: opt blob;
memory_size: nat;
cycles: nat;
});
let management_canister_id = Principal::from_text("aaaaa-aa")?;
// Address is actually a different valid one on the ic.
let arg = Encode!( &Canister { canister_id: Principal::from_text("rrkah-fqaaa-aaaaa-aaaaq-cai") } )?;
agent
.update(&management_canister_id, "canister_status")
.with_arg(&arg)
.call_and_wait(self.waiter.clone())
.await?;
I’ve seen an example using JS, but does anyone managed to make it work with the Rust agent ?
(Sorry for the formatting, I have no idea to make it pretty looking for code snippet)