feignhttp 0.6.0

Declarative HTTP client for rust
Documentation
[package]
name = "feignhttp"
version = "0.6.0"
authors = ["dxx <dx1898@foxmail.com>"]
edition = "2024"
description = "Declarative HTTP client for rust"
documentation = "https://docs.rs/feignhttp"
homepage = "https://github.com/dxx/feignhttp"
repository = "https://github.com/dxx/feignhttp"
categories = ["web-programming::http-client"]
keywords = ["http", "request", "client"]
readme = "README.md"
license = "MIT"

exclude = [
    "docs/**",
    "examples/**",
]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[workspace]
members = ["codegen"]

[features]
default = ["reqwest-client"]

reqwest-client = ["dep:reqwest"]
reqwest-middleware-client = ["dep:reqwest-middleware", "dep:reqwest"]
isahc-client = ["dep:isahc"]

reqwest-json = ["reqwest-client", "json", "reqwest/json"]
reqwest-middleware-json = ["reqwest-middleware-client", "json", "reqwest-middleware/json"]
isahc-json = ["isahc-client", "json", "isahc/json"]

reqwest-multipart = ["reqwest-client", "multipart"]
reqwest-middleware-multipart = ["reqwest-middleware-client", "multipart"]
isahc-multipart = ["isahc-client", "multipart"]

json = ["dep:serde_json"]

multipart = ["dep:mime_guess"]

log = ["dep:log"]

[dependencies]
feignhttp-codegen = { version = "0.6", path = "./codegen" }

async-trait = "0.1"

# Note: the isahc version 1.8.2 relies on http 0.2.x, so we use dynamic Dependency on http crate.
# When isahc supports http 1.x, we recommend use this dependency.
# http = "1.1"
http_1_x = { version = "1.1", package = "http"}
http_0_2 = { version = "0.2", package = "http"}

url = "2.2"
serde = "1.0"
serde_urlencoded = "0.7"
once_cell = "1.21.1"

# Optional deps...

## reqwest
reqwest = { version = "0.13", optional = true }

## reqwest-middleware
reqwest-middleware = { version = "0.5", optional = true }

## isahc
isahc = { version = "1.8.2", optional = true }

## json
serde_json = { version = "1.0", optional = true }

## mime_guess
mime_guess = { version = "2.0", optional = true }

## log
log = { version = "0.4", optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
mockito = "1.7.2"
env_logger = "0.11.10"