[package]
name = "anyhttp"
version = "0.0.0"
edition = "2024"
description = "Async HTTP requests without locking into a specific HTTP library"
license = "MIT"
repository = "https://github.com/quaero-search/anyhttp"
keywords = ["http", "client", "async", "reqwest"]
categories = ["network-programming", "web-programming::http-client"]

[dependencies]
http = "1.3.1"
async-trait = "0.1.89"
url = "2.5.7"
bytes = "1.11.0"
anyhow = "1.0.100"

# Optional dependencies
futures = { version = "0.3.31", optional = true }
reqwest = { version = "0.12.24", optional = true }

[dev-dependencies]
tokio = { version = "1.48.0", features = ["full"] }

[features]
default = []
stream = ["dep:futures", "reqwest?/stream"]
reqwest = ["dep:reqwest"]
mock = []

[[example]]
name = "reqwest_example"
required-features = ["reqwest"]

[[example]]
name = "mock_example"
required-features = ["mock"]
