Skip to main content

farcaster_rs/misc/
api_health.rs

1use crate::constants::merkle::API_ROOT;
2use crate::Farcaster;
3use std::error::Error;
4
5impl Farcaster {
6    pub async fn get_api_health() -> Result<String, Box<dyn Error>> {
7        let api_health = reqwest::Client::new()
8            .get(format!("{}/healthcheck", API_ROOT))
9            .header("Accept", "application/json")
10            .send()
11            .await?
12            .text()
13            .await?;
14
15        Ok(api_health)
16    }
17}