-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-bugCategory: bug. Something is wrong. This is bad!Category: bug. Something is wrong. This is bad!
Description
Coming from:
hyper = { version = "0.14.27", default-features = false }I switched to hyper 1.0.1 but now I'm stuck upgrading the below code:
use hyper::{client::Client, Body, Request};
pub async fn ping(uri: &str) -> Result<()> {
let hyper_client = Client::new();
if let Err(e) = retry(5, 2, || {
let req = Request::builder()
.uri(uri.to_string())
.body(Body::empty())
.unwrap();
hyper_client.request(req)
})
.await
{
return "cannot ping!"
}
Ok(())
}Can you help me understand what to use instead of client::Client now?
Should I use hyper_util::client::legacy::Client?
Why the word legacy in the name?
Or should I use all the code in https://github.com/hyperium/hyper/blob/master/examples/client.rs?
Metadata
Metadata
Assignees
Labels
C-bugCategory: bug. Something is wrong. This is bad!Category: bug. Something is wrong. This is bad!