Skip to main content

agent_first_http/cli/cmd/
health.rs

1//! `afhttp health` subcommand.
2
3use crate::cli::connect::Connection;
4use crate::cli::output;
5use crate::shared::error::Error;
6
7#[derive(Debug)]
8pub struct Args {
9    pub connection: Connection,
10}
11
12pub async fn run(args: Args) -> Result<(), Error> {
13    let client = args.connection.client().await?;
14    let response = client.health().await?;
15    output::emit("health", &response)
16}