Skip to content

Commit

Permalink
chore(deps): update rust crate hyper to v1 (#1919)
Browse files Browse the repository at this point in the history
* chore(deps): update rust crate hyper to v1

* Changed direct usage of hyper to reqwest

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nick <[email protected]>
  • Loading branch information
renovate[bot] and gurinderu authored Nov 22, 2023
1 parent a428c60 commit 8798f31
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 63 deletions.
163 changes: 161 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ humantime-serde = "1.1.1"
cid = "0.11.0"
libipld = "0.16.0"
axum = "0.6.20"
hyper = "0.14.27"
reqwest = "0.11.12"
faster-hex = "0.8.1"
once_cell = "1.18.0"

Expand Down
2 changes: 1 addition & 1 deletion crates/created-swarm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ serde_json = { workspace = true }
base64 = { workspace = true }
serde = { workspace = true }
maplit = { workspace = true }
hyper = { workspace = true }
reqwest = { workspace = true }
13 changes: 4 additions & 9 deletions crates/created-swarm/src/swarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use fluence_libp2p::Transport;
use fs_utils::{create_dir, make_tmp_dir_peer_id, to_abs_path};
use futures::future::join_all;
use futures::stream::iter;
use hyper::{Body, Request, StatusCode};
use nox::{Connectivity, Node};
use particle_protocol::ProtocolConfig;
use server_config::{system_services_config, BootstrapConfig, UnresolvedConfig};
Expand Down Expand Up @@ -205,21 +204,17 @@ where
}

async fn wait_connected_on_addrs(addrs: Vec<SocketAddr>) {
let http_client = &hyper::Client::new();
let http_client = &reqwest::Client::new();

let healthcheck = iter(addrs).for_each_concurrent(None, |addr| async move {
loop {
let response = http_client
.request(
Request::builder()
.uri(format!("http://{}/health", addr))
.body(Body::empty())
.unwrap(),
)
.get(format!("http://{}/health", addr))
.send()
.await
.unwrap();

if response.status() == StatusCode::OK {
if response.status() == reqwest::StatusCode::OK {
break;
}

Expand Down
3 changes: 2 additions & 1 deletion nox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ rand = "0.8.5"
bs58 = { workspace = true }
connected-client = { path = "../crates/connected-client" }
log-utils = { workspace = true }
hyper = { workspace = true }
reqwest = { workspace = true }


[[bench]]
name = "network_api_bench"
Expand Down
Loading

0 comments on commit 8798f31

Please sign in to comment.