# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.81"
name = "tower-http-client"
version = "0.5.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Extra Tower middlewares and utilities for HTTP clients."
documentation = "https://docs.rs/crate/tower-http-client"
readme = "README.md"
keywords = [
    "io",
    "async",
    "futures",
    "service",
    "http",
]
categories = [
    "asynchronous",
    "network-programming",
    "web-programming::http-client",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/alekseysidorov/tower-http-client"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
default = [
    "json",
    "reqwest",
    "form",
]
form = [
    "dep:serde_urlencoded",
    "http-body-reader/form",
]
json = [
    "dep:serde_json",
    "http-body-reader/json",
]
reqwest = ["dep:tower-reqwest"]

[lib]
name = "tower_http_client"
path = "src/lib.rs"

[[example]]
name = "rate_limiter"
path = "examples/rate_limiter.rs"
required-features = ["reqwest"]

[[example]]
name = "retry"
path = "examples/retry.rs"
required-features = ["reqwest"]

[[example]]
name = "send_form"
path = "examples/send_form.rs"
required-features = [
    "reqwest",
    "form",
]

[[example]]
name = "send_json"
path = "examples/send_json.rs"
required-features = [
    "reqwest",
    "json",
]

[[test]]
name = "service_ext"
path = "tests/service_ext.rs"
required-features = ["reqwest"]

[dependencies.bytes]
version = "1.10"

[dependencies.futures-util]
version = "0.3"

[dependencies.http]
version = "1.3"

[dependencies.http-body]
version = "1.0"

[dependencies.http-body-reader]
version = "0.1"
default-features = false

[dependencies.http-body-util]
version = "0.1"

[dependencies.include-utils]
version = "0.2"

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"
optional = true

[dependencies.serde_urlencoded]
version = "0.7.1"
optional = true

[dependencies.thiserror]
version = "2.0"

[dependencies.tower]
version = "0.5"
features = ["util"]
default-features = false

[dependencies.tower-layer]
version = "0.3"

[dependencies.tower-reqwest]
version = "0.5.0"
optional = true

[dependencies.tower-service]
version = "0.3"

[dependencies.url]
version = "2.5"

[dev-dependencies.anyhow]
version = "1.0"

[dev-dependencies.reqwest]
version = "0.12"
features = ["stream"]
default-features = false

[dev-dependencies.retry-policies]
version = "0.4"

[dev-dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "macros",
]

[dev-dependencies.tower]
version = "0.5"
features = [
    "util",
    "buffer",
    "limit",
    "retry",
]
default-features = false

[dev-dependencies.tower-http]
version = "0.6"
features = [
    "util",
    "set-header",
    "util",
    "map-request-body",
]
default-features = false

[dev-dependencies.tower-reqwest]
version = "0.5.0"

[dev-dependencies.wiremock]
version = "0.6"

[lints.clippy]
missing_errors_doc = "allow"
missing_panics_doc = "warn"
module_name_repetitions = "allow"

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]
missing_debug_implementations = "warn"
unsafe_code = "forbid"

[lints.rustdoc]
broken_intra_doc_links = "deny"
