#Request never returns
6 messages · Page 1 of 1 (latest)
It still never returns for me. Did you try the same url?
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let url = "https://chat-demo-umon.shuttle.app";
let client = reqwest::Client::builder().use_rustls_tls().build()?;
let res = client.get(url).send().await?;
eprintln!("Response: {:?} {}", res.version(), res.status());
eprintln!("Headers: {:#?}\n", res.headers());
let body = res.text().await?;
println!("{body}");
Ok(())
}
I just noticed default features are disabled in your cargo.toml. In that case, can you also enable http2 feature?
reqwest = { version = "0.12.12", default-features = false, features = ["rustls-tls", "http2"] }
tokio = { version = "1.0", features = ["full"] }
oh sorry let me try that
That does indeed fix it, thank you