chore: update dependencies

pull/899/head
Marc-Antoine Perennou 3 years ago committed by GitHub
parent cc4bb943b0
commit 11196c853d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,7 +63,7 @@ tokio03 = ["async-global-executor/tokio03"]
[dependencies]
async-attributes = { version = "1.1.1", optional = true }
async-mutex = { version = "1.1.3", optional = true }
crossbeam-utils = { version = "0.7.2", optional = true }
crossbeam-utils = { version = "0.8.0", optional = true }
futures-core = { version = "0.3.4", optional = true, default-features = false }
futures-io = { version = "0.3.4", optional = true }
kv-log-macro = { version = "1.0.6", optional = true }
@ -76,7 +76,7 @@ pin-utils = { version = "0.1.0-alpha.4", optional = true }
slab = { version = "0.4.2", optional = true }
# Devdepencency, but they are not allowed to be optional :/
surf = { version = "1.0.3", optional = true }
surf = { version = "2.0.0", optional = true }
[target.'cfg(not(target_os = "unknown"))'.dependencies]
async-global-executor = { version = "1.4.0", optional = true, features = ["async-io"] }
@ -92,12 +92,6 @@ futures-channel = { version = "0.3.4", optional = true }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.10"
[dependencies.tokio]
version = "0.2"
default-features = false
features = ["rt-threaded"]
optional = true
[dev-dependencies]
femme = "2.1.1"
rand = "0.7.3"

@ -1,15 +1,16 @@
use async_std::task;
fn main() -> Result<(), surf::Exception> {
fn main() -> Result<(), surf::Error> {
task::block_on(async {
let url = "https://www.rust-lang.org";
let mut response = surf::get(url).await?;
let mut response = surf::get(url).send().await?;
let body = response.body_string().await?;
dbg!(url);
dbg!(response.status());
dbg!(response.version());
dbg!(response.headers());
dbg!(response.header_names());
dbg!(response.header_values());
dbg!(body.len());
Ok(())

Loading…
Cancel
Save