forked from seanmonstar/reqwest
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cargo.toml
286 lines (225 loc) · 8.83 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
[package]
name = "reqwest"
version = "0.12.8"
description = "higher level HTTP client library"
keywords = ["http", "request", "client"]
categories = ["web-programming::http-client", "wasm"]
repository = "https://github.com/seanmonstar/reqwest"
documentation = "https://docs.rs/reqwest"
authors = ["Sean McArthur <[email protected]>"]
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.63.0"
autotests = true
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs", "--cfg", "reqwest_unstable"]
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
[package.metadata.playground]
features = [
"blocking",
"cookies",
"json",
"multipart",
]
[features]
default = ["default-tls", "charset", "http2", "macos-system-configuration"]
# Note: this doesn't enable the 'native-tls' feature, which adds specific
# functionality for it.
default-tls = ["dep:hyper-tls", "dep:native-tls-crate", "__tls", "dep:tokio-native-tls"]
http2 = ["h2", "hyper/http2", "hyper-util/http2", "hyper-rustls?/http2"]
# Enables native-tls specific functionality not available by default.
native-tls = ["default-tls"]
native-tls-alpn = ["native-tls", "native-tls-crate?/alpn", "hyper-tls?/alpn"]
native-tls-vendored = ["native-tls", "native-tls-crate?/vendored"]
rustls-tls = ["rustls-tls-webpki-roots"]
rustls-tls-no-provider = ["rustls-tls-manual-roots-no-provider"]
rustls-tls-manual-roots = ["__rustls", "__rustls-ring"]
rustls-tls-webpki-roots = ["dep:webpki-roots", "hyper-rustls?/webpki-tokio", "__rustls", "__rustls-ring"]
rustls-tls-native-roots = ["dep:rustls-native-certs", "hyper-rustls?/native-tokio", "__rustls", "__rustls-ring"]
rustls-tls-manual-roots-no-provider = ["__rustls"]
blocking = ["dep:futures-channel", "futures-channel?/sink", "futures-util/io", "futures-util/sink", "tokio/sync"]
charset = ["dep:encoding_rs"]
cookies = ["dep:cookie_crate", "dep:cookie_store"]
gzip = ["dep:async-compression", "async-compression?/gzip", "dep:tokio-util"]
brotli = ["dep:async-compression", "async-compression?/brotli", "dep:tokio-util"]
zstd = ["dep:async-compression", "async-compression?/zstd", "dep:tokio-util"]
deflate = ["dep:async-compression", "async-compression?/zlib", "dep:tokio-util"]
json = ["dep:serde_json"]
multipart = ["dep:mime_guess"]
# Deprecated, remove this feature while bumping minor versions.
trust-dns = []
hickory-dns = ["dep:hickory-resolver"]
stream = ["tokio/fs", "dep:tokio-util", "dep:wasm-streams"]
socks = ["dep:tokio-socks"]
# Use the system's proxy configuration.
macos-system-configuration = ["dep:system-configuration"]
# Experimental HTTP/3 client.
http3 = ["rustls-tls-manual-roots", "dep:h3", "dep:h3-quinn", "dep:quinn", "dep:slab", "dep:futures-channel"]
# Internal (PRIVATE!) features used to aid testing.
# Don't rely on these whatsoever. They may disappear at any time.
# Enables common types used for TLS. Useless on its own.
__tls = ["dep:rustls-pemfile", "tokio/io-util"]
# Enables common rustls code.
# Equivalent to rustls-tls-manual-roots but shorter :)
__rustls = ["dep:hyper-rustls", "dep:tokio-rustls", "dep:rustls", "__tls", "dep:rustls-pemfile", "dep:rustls-pki-types"]
__rustls-ring = ["hyper-rustls?/ring", "tokio-rustls?/ring", "rustls?/ring", "quinn?/ring"]
# When enabled, disable using the cached SYS_PROXIES.
__internal_proxy_sys_no_cache = []
[dependencies]
base64 = "0.22"
http = "1"
url = "2.4"
bytes = "1.0"
serde = "1.0"
serde_urlencoded = "0.7.1"
tower-service = "0.3"
futures-core = { version = "0.3.28", default-features = false }
futures-util = { version = "0.3.28", default-features = false }
sync_wrapper = { version = "1.0", features = ["futures"] }
# Optional deps...
## json
serde_json = { version = "1.0", optional = true }
## multipart
mime_guess = { version = "2.0", default-features = false, optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
encoding_rs = { version = "0.8", optional = true }
http-body = "1"
http-body-util = "0.1"
hyper = { version = "1.1", features = ["http1", "client"] }
hyper-util = { version = "0.1.3", features = ["http1", "client", "client-legacy", "tokio"] }
h2 = { version = "0.4", optional = true }
once_cell = "1.18"
log = "0.4.17"
mime = "0.3.16"
percent-encoding = "2.3"
tokio = { version = "1.0", default-features = false, features = ["net", "time"] }
pin-project-lite = "0.2.11"
ipnet = "2.3"
# Optional deps...
rustls-pemfile = { version = "2", optional = true }
## default-tls
hyper-tls = { version = "0.6", optional = true }
native-tls-crate = { version = "0.2.10", optional = true, package = "native-tls" }
tokio-native-tls = { version = "0.3.0", optional = true }
# rustls-tls
hyper-rustls = { version = "0.27.0", default-features = false, optional = true, features = ["http1", "tls12"] }
rustls = { version = "0.23.4", optional = true, default-features = false, features = ["std", "tls12"] }
rustls-pki-types = { version = "1.1.0", features = ["alloc"] ,optional = true }
tokio-rustls = { version = "0.26", optional = true, default-features = false, features = ["tls12"] }
webpki-roots = { version = "0.26.0", optional = true }
rustls-native-certs = { version = "0.8.0", optional = true }
## cookies
cookie_crate = { version = "0.18.0", package = "cookie", optional = true }
cookie_store = { version = "0.21.0", optional = true }
## compression
async-compression = { version = "0.4.0", default-features = false, features = ["tokio"], optional = true }
tokio-util = { version = "0.7.9", default-features = false, features = ["codec", "io"], optional = true }
## socks
tokio-socks = { version = "0.5.2", optional = true }
## hickory-dns
hickory-resolver = { version = "0.24", optional = true, features = ["tokio-runtime"] }
# HTTP/3 experimental support
h3 = { version = "0.0.6", optional = true }
h3-quinn = { version = "0.0.7", optional = true }
quinn = { version = "0.11.1", default-features = false, features = ["rustls", "runtime-tokio"], optional = true }
slab = { version = "0.4.9", optional = true } # just to get minimal versions working with quinn
futures-channel = { version = "0.3", optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
env_logger = "0.10"
hyper = { version = "1.1.0", default-features = false, features = ["http1", "http2", "client", "server"] }
hyper-util = { version = "0.1.3", features = ["http1", "http2", "client", "client-legacy", "server-auto", "tokio"] }
serde = { version = "1.0", features = ["derive"] }
libflate = "2.1"
brotli_crate = { package = "brotli", version = "6.0.0" }
zstd_crate = { package = "zstd", version = "0.13" }
doc-comment = "0.3"
tokio = { version = "1.0", default-features = false, features = ["macros", "rt-multi-thread"] }
futures-util = { version = "0.3.28", default-features = false, features = ["std", "alloc"] }
rustls = { version = "0.23", default-features = false, features = ["ring"] }
[target.'cfg(windows)'.dependencies]
windows-registry = "0.2"
[target.'cfg(target_os = "macos")'.dependencies]
system-configuration = { version = "0.6.0", optional = true }
# wasm
[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3.45"
serde_json = "1.0"
wasm-bindgen = "0.2.89"
wasm-bindgen-futures = "0.4.18"
wasm-streams = { version = "0.4", optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3.28"
features = [
"AbortController",
"AbortSignal",
"Headers",
"Request",
"RequestInit",
"RequestMode",
"Response",
"Window",
"FormData",
"Blob",
"BlobPropertyBag",
"ServiceWorkerGlobalScope",
"RequestCredentials",
"File",
"ReadableStream"
]
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen = { version = "0.2.89", features = ["serde-serialize"] }
wasm-bindgen-test = "0.3"
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(reqwest_unstable)'] }
[[example]]
name = "blocking"
path = "examples/blocking.rs"
required-features = ["blocking"]
[[example]]
name = "json_dynamic"
path = "examples/json_dynamic.rs"
required-features = ["json"]
[[example]]
name = "json_typed"
path = "examples/json_typed.rs"
required-features = ["json"]
[[example]]
name = "tor_socks"
path = "examples/tor_socks.rs"
required-features = ["socks"]
[[example]]
name = "form"
path = "examples/form.rs"
[[example]]
name = "simple"
path = "examples/simple.rs"
[[test]]
name = "blocking"
path = "tests/blocking.rs"
required-features = ["blocking"]
[[test]]
name = "cookie"
path = "tests/cookie.rs"
required-features = ["cookies"]
[[test]]
name = "gzip"
path = "tests/gzip.rs"
required-features = ["gzip", "stream"]
[[test]]
name = "brotli"
path = "tests/brotli.rs"
required-features = ["brotli", "stream"]
[[test]]
name = "zstd"
path = "tests/zstd.rs"
required-features = ["zstd", "stream"]
[[test]]
name = "deflate"
path = "tests/deflate.rs"
required-features = ["deflate", "stream"]
[[test]]
name = "multipart"
path = "tests/multipart.rs"
required-features = ["multipart"]