[package]
edition = "2024"
name = "r402-http"
version = "0.9.1"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "HTTP transport layer for the x402 payment protocol."
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/qntx/r402"
[package.metadata.docs.rs]
all-features = true
[features]
client = [
"dep:async-trait",
"dep:http",
"dep:reqwest",
"dep:reqwest-middleware",
]
default = []
full = [
"client",
"server",
"telemetry",
]
server = [
"dep:axum-core",
"dep:http",
"dep:reqwest",
"dep:serde",
"dep:tokio",
"dep:tower",
"dep:url",
]
telemetry = [
"dep:tracing",
"r402/telemetry",
]
[lib]
name = "r402_http"
path = "src/lib.rs"
[dependencies.async-trait]
version = "0.1"
optional = true
[dependencies.axum-core]
version = "0.5"
optional = true
[dependencies.http]
version = "1.4"
optional = true
[dependencies.r402]
version = "0.9"
[dependencies.reqwest]
version = "0.13"
features = ["json"]
optional = true
[dependencies.reqwest-middleware]
version = "0.5"
optional = true
[dependencies.serde]
version = "1"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "1"
features = ["raw_value"]
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"sync",
"rt-multi-thread",
]
optional = true
[dependencies.tower]
version = "0.5"
optional = true
[dependencies.tracing]
version = "0.1"
optional = true
[dependencies.url]
version = "2"
features = ["serde"]
optional = true
[dev-dependencies.tokio]
version = "1"
features = [
"sync",
"rt-multi-thread",
"macros",
"rt-multi-thread",
]
[dev-dependencies.wiremock]
version = "0.6"
[lints.clippy]
await_holding_lock = "warn"
await_holding_refcell_ref = "warn"
cargo_common_metadata = "allow"
cast_lossless = "warn"
cast_possible_truncation = "warn"
cast_precision_loss = "allow"
cast_sign_loss = "warn"
clone_on_ref_ptr = "warn"
cognitive_complexity = "warn"
dbg_macro = "warn"
doc_markdown = "warn"
excessive_nesting = "allow"
exhaustive_enums = "allow"
exhaustive_structs = "allow"
expect_used = "allow"
fallible_impl_from = "warn"
fn_params_excessive_bools = "warn"
future_not_send = "warn"
implicit_hasher = "warn"
indexing_slicing = "allow"
large_types_passed_by_value = "warn"
match_same_arms = "warn"
match_wildcard_for_single_variants = "warn"
mem_forget = "warn"
missing_docs_in_private_items = "allow"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
missing_safety_doc = "warn"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"
must_use_candidate = "warn"
option_if_let_else = "warn"
panic = "warn"
panic_in_result_fn = "warn"
print_stderr = "warn"
print_stdout = "warn"
redundant_clone = "warn"
return_self_not_must_use = "warn"
shadow_reuse = "allow"
shadow_same = "allow"
shadow_unrelated = "allow"
significant_drop_tightening = "allow"
similar_names = "allow"
struct_excessive_bools = "allow"
todo = "warn"
too_many_lines = "allow"
unimplemented = "warn"
unwrap_in_result = "warn"
unwrap_used = "warn"
used_underscore_binding = "warn"
wildcard_enum_match_arm = "allow"
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.complexity]
level = "warn"
priority = -1
[lints.clippy.correctness]
level = "deny"
priority = -1
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.clippy.perf]
level = "warn"
priority = -1
[lints.clippy.restriction]
level = "allow"
priority = -1
[lints.clippy.style]
level = "warn"
priority = -1
[lints.clippy.suspicious]
level = "warn"
priority = -1
[lints.rust]
elided_lifetimes_in_paths = "warn"
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
non_ascii_idents = "warn"
non_camel_case_types = "warn"
non_snake_case = "warn"
non_upper_case_globals = "warn"
single_use_lifetimes = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unsafe_code = "warn"
unused_imports = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
variant_size_differences = "warn"
[lints.rust.rust_2024_compatibility]
level = "warn"
priority = -1
[lints.rustdoc]
bare_urls = "warn"
broken_intra_doc_links = "warn"
invalid_codeblock_attributes = "warn"
invalid_html_tags = "warn"
invalid_rust_codeblocks = "warn"
missing_crate_level_docs = "warn"
private_intra_doc_links = "warn"
unescaped_backticks = "warn"