[package]
name = "reqwest-cross"
version = "0.4.2"
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"
[dependencies]
futures = "0.3.28"
reqwest = { version = "0.12.3", default-features = false }
[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 }
[dev-dependencies]
reqwest = { version = "0.12.3" }
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"
required-features = ["yield_now"]
[features]
default = ["native-tokio"]
native-tokio = ["dep:tokio"]
yield_now = ["dep:js-sys", "web-sys"]