From 3ad4dd9669b4dae42e1520866aa03d603d715272 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 14 Feb 2021 16:54:46 +0900 Subject: [PATCH] Update isahc to 1.1 --- Cargo.toml | 2 +- src/isahc.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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();