http-constant 23.3.2

A comprehensive library providing common HTTP constants for header names, versions, MIME types, and protocol identifiers.
Documentation

http-constant

Zero-Dependency Canonical HTTP Protocol Constants

Crates.io Version Docs.rs CI Status Rust 2024 License: MIT

Workspace Overview · API Docs


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 workspace.

Installation

cargo add http-constant

Usage

use http_constant::{CONTENT_TYPE, APPLICATION_JSON};

fn json_header() -> (&'static str, &'static str) {
    (CONTENT_TYPE, APPLICATION_JSON)
}

Verification

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 file for details.

Contact

For inquiries, please contact the author at root@devhub.vip.