Extract http from util (#11680)

This avoids the CLI linking libssl etc...

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-05-10 15:50:20 -06:00 committed by GitHub
parent df41435d1a
commit 5515ba6043
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 419 additions and 336 deletions

View file

@ -69,6 +69,7 @@ use rand::prelude::*;
use search_history::SearchHistory;
use worktree::LocalSnapshot;
use http::{HttpClient, Url};
use rpc::{ErrorCode, ErrorExt as _};
use search::SearchQuery;
use serde::Serialize;
@ -99,9 +100,7 @@ use task::static_source::{StaticSource, TrackedFile};
use terminals::Terminals;
use text::{Anchor, BufferId, LineEnding};
use util::{
debug_panic, defer,
http::{HttpClient, Url},
maybe, merge_json_value_into, parse_env_output,
debug_panic, defer, maybe, merge_json_value_into, parse_env_output,
paths::{
LOCAL_SETTINGS_RELATIVE_PATH, LOCAL_TASKS_RELATIVE_PATH, LOCAL_VSCODE_TASKS_RELATIVE_PATH,
},
@ -1003,7 +1002,7 @@ impl Project {
let fs = Arc::new(RealFs::default());
let languages = LanguageRegistry::test(cx.background_executor().clone());
let clock = Arc::new(FakeSystemClock::default());
let http_client = util::http::FakeHttpClient::with_404_response();
let http_client = http::FakeHttpClient::with_404_response();
let client = cx
.update(|cx| client::Client::new(clock, http_client.clone(), cx))
.unwrap();
@ -1047,7 +1046,7 @@ impl Project {
let languages = LanguageRegistry::test(cx.executor());
let clock = Arc::new(FakeSystemClock::default());
let http_client = util::http::FakeHttpClient::with_404_response();
let http_client = http::FakeHttpClient::with_404_response();
let client = cx.update(|cx| client::Client::new(clock, http_client.clone(), cx));
let user_store = cx.new_model(|cx| UserStore::new(client.clone(), cx));
let project = cx.update(|cx| {