[dependencies.anyhow]
version = "1.0"
[dependencies.axum]
optional = true
version = "0.7"
[dependencies.futures]
optional = true
version = "0.3"
[dependencies.http-body-util]
optional = true
version = "0.1"
[dependencies.http_api_macro]
version = "0.1.0"
[dependencies.reqwest]
features = ["json"]
optional = true
version = "0.12"
[dependencies.serde]
features = ["derive"]
version = "1.0"
[dependencies.serde_json]
version = "1.0"
[dependencies.tokio]
features = ["full"]
optional = true
version = "1.0"
[dependencies.tokio-stream]
optional = true
version = "0.1"
[dev-dependencies.axum]
version = "0.7"
[dev-dependencies.futures]
version = "0.3"
[dev-dependencies.reqwest]
features = ["json", "stream"]
version = "0.12"
[dev-dependencies.tokio]
features = ["full"]
version = "1.0"
[dev-dependencies.tower]
features = ["util"]
version = "0.5"
[[example]]
name = "chat_websocket"
path = "examples/chat_websocket.rs"
[[example]]
name = "notification_sse"
path = "examples/notification_sse.rs"
[[example]]
name = "todo_api"
path = "examples/todo_api.rs"
[features]
axum-adapter = ["axum/ws", "axum", "tokio", "tokio-stream", "futures", "http-body-util"]
default = ["axum-adapter", "reqwest-adapter"]
reqwest-adapter = ["reqwest", "tokio"]
[lib]
name = "http_api"
path = "src/lib.rs"
[package]
authors = ["nobane"]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = false
description = "Declare modular HTTP client/server APIS using XHR, WebSocket and SSE"
edition = "2024"
license = "MIT"
name = "http_api"
readme = "README.md"
resolver = "2"
version = "0.1.0"
[[test]]
name = "test_sse_integration"
path = "tests/test_sse_integration.rs"
[[test]]
name = "test_sse_macro"
path = "tests/test_sse_macro.rs"
[[test]]
name = "test_websocket_macro"
path = "tests/test_websocket_macro.rs"
[[test]]
name = "test_xhr_macro"
path = "tests/test_xhr_macro.rs"