diff --git a/Cargo.lock b/Cargo.lock index 02f5ad7bde..174973817f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -425,7 +425,6 @@ dependencies = [ "os_pipe", "rand 0.7.3", "regex", - "reqwest", "ring", "rustyline", "semver-parser 0.9.0", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index bb4d2714b4..68ea4c4ccc 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -56,7 +56,6 @@ env_logger = "0.7.1" notify = "5.0.0-pre.3" rand = "0.7.3" regex = "1.3.9" -reqwest = { version = "0.10.8", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli"] } ring = "0.16.15" rustyline = { version = "6.3.0", default-features = false } serde = { version = "1.0.116", features = ["derive"] } diff --git a/cli/errors.rs b/cli/errors.rs index 01fe318ee3..7e9eb5b36f 100644 --- a/cli/errors.rs +++ b/cli/errors.rs @@ -14,6 +14,7 @@ use crate::import_map::ImportMapError; use deno_core::error::AnyError; use deno_core::url; use deno_core::ModuleResolutionError; +use deno_fetch::reqwest; use rustyline::error::ReadlineError; use std::env; use std::error::Error; diff --git a/cli/file_fetcher.rs b/cli/file_fetcher.rs index faf4e7a6fc..c4a4d8ea31 100644 --- a/cli/file_fetcher.rs +++ b/cli/file_fetcher.rs @@ -15,6 +15,7 @@ use deno_core::error::AnyError; use deno_core::url; use deno_core::url::Url; use deno_core::ModuleSpecifier; +use deno_fetch::reqwest; use futures::future::FutureExt; use log::info; use std::borrow::Cow; diff --git a/cli/http_util.rs b/cli/http_util.rs index 7472bb631a..0defed2a1a 100644 --- a/cli/http_util.rs +++ b/cli/http_util.rs @@ -5,15 +5,16 @@ use bytes::Bytes; use deno_core::error::generic_error; use deno_core::error::AnyError; use deno_core::url::Url; -use reqwest::header::HeaderMap; -use reqwest::header::HeaderValue; -use reqwest::header::IF_NONE_MATCH; -use reqwest::header::LOCATION; -use reqwest::header::USER_AGENT; -use reqwest::redirect::Policy; -use reqwest::Client; -use reqwest::Response; -use reqwest::StatusCode; +use deno_fetch::reqwest; +use deno_fetch::reqwest::header::HeaderMap; +use deno_fetch::reqwest::header::HeaderValue; +use deno_fetch::reqwest::header::IF_NONE_MATCH; +use deno_fetch::reqwest::header::LOCATION; +use deno_fetch::reqwest::header::USER_AGENT; +use deno_fetch::reqwest::redirect::Policy; +use deno_fetch::reqwest::Client; +use deno_fetch::reqwest::Response; +use deno_fetch::reqwest::StatusCode; use std::cmp::min; use std::collections::HashMap; use std::fs::File; diff --git a/cli/upgrade.rs b/cli/upgrade.rs index c3b471f520..544f2b3291 100644 --- a/cli/upgrade.rs +++ b/cli/upgrade.rs @@ -11,9 +11,11 @@ use crate::http_util::FetchOnceResult; use crate::AnyError; use deno_core::error::custom_error; use deno_core::url::Url; +use deno_fetch::reqwest; +use deno_fetch::reqwest::redirect::Policy; +use deno_fetch::reqwest::Client; use futures::FutureExt; use regex::Regex; -use reqwest::{redirect::Policy, Client}; use semver_parser::version::parse as semver_parse; use semver_parser::version::Version; use std::fs;