mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-27 00:00:24 +02:00
Make JSON and HTTP1 support optional (#286)
* Make json support an optional feature * Fix Json type documentation * Make hyper's http1 feature optional
This commit is contained in:
+6
-3
@@ -15,8 +15,10 @@ repository = "https://github.com/tokio-rs/axum"
|
||||
members = ["examples/*"]
|
||||
|
||||
[features]
|
||||
default = ["tower-log"]
|
||||
default = ["http1", "json", "tower-log"]
|
||||
http1 = ["hyper/http1"]
|
||||
http2 = ["hyper/http2"]
|
||||
json = ["serde_json"]
|
||||
multipart = ["multer", "mime"]
|
||||
tower-log = ["tower/log"]
|
||||
ws = ["tokio-tungstenite", "sha-1", "base64"]
|
||||
@@ -28,11 +30,11 @@ bytes = "1.0"
|
||||
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
|
||||
http = "0.2"
|
||||
http-body = "0.4.3"
|
||||
hyper = { version = "0.14", features = ["server", "tcp", "http1", "stream"] }
|
||||
hyper = { version = "0.14", features = ["server", "tcp", "stream"] }
|
||||
pin-project-lite = "0.2.7"
|
||||
regex = "1.5"
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
serde_json = { version = "1.0", optional = true }
|
||||
serde_urlencoded = "0.7"
|
||||
tokio = { version = "1", features = ["time"] }
|
||||
tokio-util = "0.6"
|
||||
@@ -54,6 +56,7 @@ mime = { optional = true, version = "0.3" }
|
||||
futures = "0.3"
|
||||
reqwest = { version = "0.11", features = ["json", "stream"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
tokio = { version = "1.6.1", features = ["macros", "rt", "rt-multi-thread", "net"] }
|
||||
uuid = { version = "0.8", features = ["serde", "v4"] }
|
||||
tokio-stream = "0.1"
|
||||
|
||||
Reference in New Issue
Block a user