Revert http client changes (#18892)

These proved to be too unstable. Will restore these changes once the issues have been fixed.

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-10-09 01:07:18 -07:00 committed by GitHub
parent e351148152
commit 5d5c4b6677
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 386 additions and 1125 deletions

View file

@ -24,9 +24,9 @@ use gpui::{
UpdateGlobal as _, VisualContext,
};
use http_client::{read_proxy_from_env, Uri};
use isahc_http_client::IsahcHttpClient;
use language::LanguageRegistry;
use log::LevelFilter;
use ureq_client::UreqClient;
use assets::Assets;
use node_runtime::{NodeBinaryOptions, NodeRuntime};
@ -334,7 +334,9 @@ fn main() {
log::info!("========== starting zed ==========");
let app = App::new().with_assets(Assets);
let app = App::new()
.with_assets(Assets)
.with_http_client(IsahcHttpClient::new(None, None));
let system_id = app.background_executor().block(system_id()).ok();
let installation_id = app.background_executor().block(installation_id()).ok();
@ -468,8 +470,8 @@ fn main() {
.ok()
})
.or_else(read_proxy_from_env);
let http = UreqClient::new(proxy_url, user_agent, cx.background_executor().clone());
cx.set_http_client(Arc::new(http));
let http = IsahcHttpClient::new(proxy_url, Some(user_agent));
cx.set_http_client(http);
<dyn Fs>::set_global(fs.clone(), cx);