<div align="center">
<img src="https://devhub.vip/pages/docs/img/hyperlane.png" alt="http-constant logo" height="120">
# http-constant
**Zero-Dependency Canonical HTTP Protocol Constants**
[](https://crates.io/crates/http-constant)
[](https://docs.rs/http-constant)
[](https://github.com/hyperlane-dev/hyperlane/actions/workflows/rust.yml)
[](https://www.rust-lang.org)
[](../LICENSE)
[Workspace Overview](../README.md) ยท [API Docs](https://docs.rs/http-constant/latest/)
</div>
---
## Overview
`http-constant` is the zero-dependency leaf crate providing canonical HTTP header keys, header values, status codes, methods, MIME types, file extensions, and HTTP/2 protocol constants across the [`hyperlane`](../README.md) workspace.
## Installation
```sh
cargo add http-constant
```
## Usage
```rust
use http_constant::{CONTENT_TYPE, APPLICATION_JSON};
fn json_header() -> (&'static str, &'static str) {
(CONTENT_TYPE, APPLICATION_JSON)
}
```
## Verification
```sh
cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p http-constant --all-features --all-targets -- -D warnings
cargo test -p http-constant --all-features
```
## License
This project is licensed under the MIT License. See the [LICENSE](../LICENSE) file for details.
## Contact
For inquiries, please contact the author at [root@devhub.vip](mailto:root@devhub.vip).