Files
mytheclipse/crates/mytheclipse-http/Cargo.toml
T
2026-08-29 12:08:43 +00:00

41 lines
1.7 KiB
TOML

[package]
name = "mytheclipse-http"
version = "1.9.0"
edition = "2021"
rust-version = "1.75"
license = "MIT OR Apache-2.0"
repository = "https://github.com/asepharyana/mytheclipse"
homepage = "https://github.com/asepharyana/mytheclipse"
documentation = "https://docs.rs/mytheclipse-http"
authors = ["asepharyana <superaseph@gmail.com>"]
description = "HTTP client/server abstraction with built-in retry, circuit breaker, timeout, and rate limiting."
readme = "README.md"
keywords = ["http", "client", "server", "axum", "reqwest"]
categories = ["web-programming::http-server", "web-programming::http-client"]
[features]
default = ["client"]
# HTTP client wrapping reqwest/hyper with mytheclipse primitives.
client = ["dep:reqwest", "dep:tokio"]
# Server backed by hyper.
server-hyper = ["dep:hyper", "dep:tokio"]
# Server backed by axum.
server-axum = ["dep:axum", "dep:hyper", "dep:tokio"]
# Metrics HTTP endpoint serving Prometheus text format from a MetricsCollector.
metrics-http = ["dep:axum", "dep:tower", "dep:tokio", "dep:mytheclipse"]
[dependencies]
tracing = "0.1"
async-trait = "0.1"
tokio = { version = "1.53", features = ["sync", "time", "rt", "macros"], optional = true }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"], optional = true }
hyper = { version = "1", features = ["full"], optional = true }
axum = { version = "0.8", optional = true }
tower = { version = "0.5", optional = true, default-features = false, features = ["util"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
mytheclipse = { version = "1.5", path = "../mytheclipse", optional = true, default-features = false, features = ["observability"] }
[dev-dependencies]
tokio = { version = "1.53", features = ["full"] }