Skip to content

Commit 28f3aee

Browse files
authored
feat(http): add multipart for server (#511)
1 parent 70e89bd commit 28f3aee

File tree

11 files changed

+1029
-343
lines changed

11 files changed

+1029
-343
lines changed

Cargo.lock

+167-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ mime = "0.3"
8080
mime_guess = { version = "2", default-features = false }
8181
mockall = "0.13"
8282
mockall_double = "0.3"
83+
multer = "3.1"
8384
mur3 = "0.1"
8485
nix = "0.29"
8586
nom = "7"
@@ -96,6 +97,7 @@ proc-macro2 = "1"
9697
quote = "1"
9798
rand = "0.8"
9899
regex = "1"
100+
reqwest = "0.12"
99101
run_script = "0.10"
100102
rustc-hash = { version = "2", features = ["rand"] }
101103
same-file = "1"
@@ -121,6 +123,7 @@ tower = "0.5"
121123
tracing = "0.1"
122124
tracing-subscriber = "0.3"
123125
update-informer = "1"
126+
url = "2.5"
124127
url_path = "0.1"
125128
walkdir = "2"
126129

volo-http/Cargo.toml

+6-2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ tokio-util = { workspace = true, features = ["io"] }
6060
tracing.workspace = true
6161

6262
# =====optional=====
63+
multer = { workspace = true, optional = true }
6364

6465
# server optional
6566
matchit = { workspace = true, optional = true }
@@ -84,19 +85,22 @@ sonic-rs = { workspace = true, optional = true }
8485
async-stream.workspace = true
8586
libc.workspace = true
8687
serde = { workspace = true, features = ["derive"] }
88+
reqwest = { workspace = true, features = ["multipart"] }
8789
tokio-test.workspace = true
90+
url.workspace = true
8891

8992
[features]
9093
default = []
9194

9295
default_client = ["client", "json"]
93-
default_server = ["server", "query", "form", "json"]
96+
default_server = ["server", "query", "form", "json", "multipart"]
9497

95-
full = ["client", "server", "rustls", "cookie", "query", "form", "json", "tls", "ws"]
98+
full = ["client", "server", "rustls", "cookie", "query", "form", "json", "multipart", "tls", "ws"]
9699

97100
client = ["hyper/client", "hyper/http1"] # client core
98101
server = ["hyper/server", "hyper/http1", "dep:matchit"] # server core
99102

103+
multipart = ["dep:multer"]
100104
ws = ["dep:tungstenite", "dep:tokio-tungstenite"]
101105

102106
tls = ["rustls"]

0 commit comments

Comments
 (0)