[package]
name = "reqwest-cross"
version = "0.5.1"
authors = ["One <one.bgz1@gmail.com>"]
categories = ["web-programming::http-client", "wasm"]
documentation = "https://docs.rs/reqwest-cross"
edition = "2021"
keywords = ["http", "wasm", "native", "web", "request"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/c-git/reqwest-cross"
description = "Wrapper around reqwest for use in both native and wasm"
[package.metadata.docs.rs]
all-features = true
[dependencies]
anyhow = "1.0.95"
document-features = "0.2.10"
egui = { version = "0.30.0", default-features = false, optional = true }
futures = "0.3.28"
rand = "0.8.5"
reqwest = { version = "0.12.12", default-features = false }
thiserror = "2.0.9"
tracing = "0.1.41"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1", default-features = false, optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4.34"
js-sys = { version = "0.3.69", optional = true }
web-sys = { version = "0.3.69", optional = true }
getrandom = { version = "0.2.15", features = ["js"] }
[dev-dependencies]
wasm-bindgen-test = "0.3.34"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { version = "1.27.0", default-features = false, features = [
"macros",
"rt-multi-thread",
] }
[[example]]
name = "loop_yield_custom"
required-features = ["yield_now"]
[[example]]
name = "loop_yield_data_state"
required-features = ["yield_now"]
[features]
default = ["native-tokio", "reqwest_default"]
reqwest_default = ["reqwest/default"]
native-tokio = ["dep:tokio"]
yield_now = ["dep:js-sys", "dep:web-sys"]
egui = ["dep:egui"]
default-tls = ["reqwest/default-tls"]
native-tls = ["reqwest/native-tls"]
rustls-tls = ["reqwest/rustls-tls"]
http2 = ["reqwest/http2"]
json = ["reqwest/json"]
cookies = ["reqwest/cookies"]
hickory-dns = ["reqwest/hickory-dns"]
multipart = ["reqwest/multipart"]
socks = ["reqwest/socks"]
stream = ["reqwest/stream"]
brotli = ["reqwest/brotli"]
deflate = ["reqwest/deflate"]
gzip = ["reqwest/gzip"]
zstd = ["reqwest/zstd"]