You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[package]
name = "reqwest-test"version = "0.1.0"edition = "2021"
[dependencies]
tokio = { version = "1", features = ["macros", "rt"] }
# same with `native-tls-alpn`reqwest = { version = "=0.12.0", default-features = false, features = ["rustls-tls-native-roots"] }
src/main.rs
#[tokio::main(flavor = "current_thread")]asyncfnmain(){let text = reqwest::get("https://www.cloudflare.com/cdn-cgi/trace").await.unwrap().text().await.unwrap();println!("{text}");}
Output
thread 'main' panicked at /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-util-0.1.3/src/client/legacy/client.rs:554:33:
http2 feature is not enabled
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The text was updated successfully, but these errors were encountered:
Cargo.toml
src/main.rs
Output
The text was updated successfully, but these errors were encountered: