Skip to content

Commit

Permalink
Use global HTTP client in reqwest_resume (#3770)
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs authored Nov 30, 2023
1 parent 0152318 commit 4c831e5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/utils/reqwest_resume/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//! Some modifications have been done to update the code regarding `tokio`,
//! replace the `hyperx` dependency with `hyper` and add two unit tests.

use crate::utils::net::global_http_client;
use bytes::Bytes;
use futures::{ready, FutureExt as _, Stream, TryFutureExt as _};
use std::{
Expand All @@ -36,11 +37,9 @@ impl ClientExt for reqwest::Client {
#[derive(Debug)]
pub struct Client(reqwest::Client);
impl Client {
/// Constructs a new `Client`.
///
/// See [`reqwest::Client::new()`].
/// Constructs a new `Client` using the global Forest HTTP client.
pub fn new() -> Self {
Self(reqwest::Client::new())
Self(global_http_client())
}
/// Convenience method to make a `GET` request to a URL.
///
Expand Down

0 comments on commit 4c831e5

Please sign in to comment.