use http::header;
pub const X_TARGET_URL: &str = "x-target-url";
pub const X_REQUEST_ID: &str = "x-request-id";
pub const X_SESSION_ID: &str = "x-session-id";
pub const X_API_KEY: &str = "x-api-key";
pub const BEARER_PREFIX: &str = "Bearer ";
pub use header::{AUTHORIZATION, CONTENT_LENGTH, CONTENT_TYPE, HOST, USER_AGENT};
pub mod paths {
pub const DEFAULT: &str = "/";
pub const HEALTH: &str = "/health";
pub const METRICS: &str = "/metrics";
}
pub mod content_types {
pub const APPLICATION_JSON: &str = "application/json";
pub const TEXT_PLAIN: &str = "text/plain";
pub const TEXT_HTML: &str = "text/html; charset=utf-8";
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_header_constants() {
assert!(X_TARGET_URL.starts_with("x-"));
assert!(X_REQUEST_ID.starts_with("x-"));
assert!(X_SESSION_ID.starts_with("x-"));
assert!(paths::DEFAULT.starts_with('/'));
assert!(paths::HEALTH.starts_with('/'));
assert!(paths::METRICS.starts_with('/'));
assert!(BEARER_PREFIX.ends_with(' '));
}
}