UNPKG

@prefecthq/prefect-ui-library

Version:

This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.

17 lines (14 loc) 360 B
import { Api } from '@/services/Api' export class HealthApi extends Api { protected override routePrefix = '/health' public getHealth(): Promise<boolean> { return this.get<boolean>().then(({ data }) => data) } public async isHealthy(): Promise<boolean> { try { return await this.getHealth() } catch { return false } } }