hooksniff 1.5.1

HookSniff webhooks API client and webhook verification library
Documentation
use crate::{error::Result, Configuration};

pub struct Health<'a> {
    cfg: &'a Configuration,
}

impl<'a> Health<'a> {
    pub fn new(cfg: &'a Configuration) -> Self {
        Self { cfg }
    }

    /// Verify the API server is up and running.
    pub async fn get(&self) -> Result<()> {
        crate::request::Request::new(http1::Method::GET, "/v1/health")
            .returns_nothing()
            .execute(self.cfg)
            .await
    }
}