use axum::http;
use axum::http::HeaderValue;
use axum::response::IntoResponse;
use crate::format;
#[inline]
#[must_use]
#[allow(clippy::unused_async)]
pub async fn get_health() -> impl IntoResponse {
(
http::StatusCode::OK,
[(
http::header::CONTENT_TYPE,
HeaderValue::from_static("text/plain; charset=utf-8"),
)],
format::HEALTH_BODY,
)
}
#[inline]
#[must_use]
#[allow(clippy::unused_async)]
pub async fn head_health() -> impl IntoResponse {
http::StatusCode::NO_CONTENT
}
#[inline]
#[must_use]
#[allow(clippy::unused_async)]
pub async fn options_health() -> impl IntoResponse {
(
http::StatusCode::NO_CONTENT,
[(
http::header::ALLOW,
HeaderValue::from_static("GET, HEAD, OPTIONS"),
)],
)
}