diff --git a/Cargo.toml b/Cargo.toml index 4cd8915..dda06a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ futures-util = { version = "0.3.5", features = ["io"], optional = true } # curl_client [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -isahc = { version = "0.9", optional = true, default-features = false, features = ["http2"] } +isahc = { version = "1.1.0", optional = true, default-features = false, features = ["http2"] } # wasm_client [target.'cfg(target_arch = "wasm32")'.dependencies] diff --git a/src/isahc.rs b/src/isahc.rs index b95f062..443e74f 100644 --- a/src/isahc.rs +++ b/src/isahc.rs @@ -40,8 +40,8 @@ impl HttpClient for IsahcClient { let body = req.take_body(); let body = match body.len() { - Some(len) => isahc::Body::from_reader_sized(body, len as u64), - None => isahc::Body::from_reader(body), + Some(len) => isahc::AsyncBody::from_reader_sized(body, len as u64), + None => isahc::AsyncBody::from_reader(body), }; let request = builder.body(body).unwrap();