File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ wasm-client = [
52
52
" getrandom/js" ,
53
53
" web-sys" ,
54
54
]
55
+ native-client = [" http-client/native_client" , " default-client" ]
55
56
default-client = []
56
57
middleware-logger = []
57
58
# requires web-sys for TextDecoder on wasm
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ cfg_if! {
17
17
use http_client:: h1:: H1Client as DefaultClient ;
18
18
} else if #[ cfg( feature = "hyper-client" ) ] {
19
19
use http_client:: hyper:: HyperClient as DefaultClient ;
20
+ } else if #[ cfg( all( feature = "native-client" , target_arch = "wasm32" ) ) ] {
21
+ use http_client:: wasm:: WasmClient as DefaultClient ;
22
+ } else if #[ cfg( all( feature = "native-client" , not( target_arch = "wasm32" ) ) ) ] {
23
+ use http_client:: isahc:: IsahcClient as DefaultClient ;
20
24
}
21
25
}
22
26
cfg_if ! {
You can’t perform that action at this time.
0 commit comments