Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ wasm-client = [
"getrandom/js",
"web-sys",
]
native-client = ["http-client/native_client", "default-client"]
default-client = []
middleware-logger = []
# requires web-sys for TextDecoder on wasm
Expand Down
4 changes: 4 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ cfg_if! {
use http_client::h1::H1Client as DefaultClient;
} else if #[cfg(feature = "hyper-client")] {
use http_client::hyper::HyperClient as DefaultClient;
} else if #[cfg(all(feature = "native-client", target_arch = "wasm32"))] {
use http_client::wasm::WasmClient as DefaultClient;
} else if #[cfg(all(feature = "native-client", not(target_arch = "wasm32")))] {
use http_client::isahc::IsahcClient as DefaultClient;
}
}
cfg_if! {
Expand Down