Restore HTTP client transition, but use reqwest everywhere (#19055)
Release Notes: - N/A
This commit is contained in:
parent
c709b66f35
commit
22ac178f9d
35 changed files with 838 additions and 418 deletions
|
@ -22,7 +22,6 @@ editor.workspace = true
|
|||
fuzzy.workspace = true
|
||||
gpui.workspace = true
|
||||
indoc.workspace = true
|
||||
isahc_http_client.workspace = true
|
||||
language.workspace = true
|
||||
log.workspace = true
|
||||
menu.workspace = true
|
||||
|
@ -36,6 +35,7 @@ strum = { workspace = true, features = ["derive"] }
|
|||
theme.workspace = true
|
||||
title_bar = { workspace = true, features = ["stories"] }
|
||||
ui = { workspace = true, features = ["stories"] }
|
||||
reqwest_client.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
gpui = { workspace = true, features = ["test-support"] }
|
||||
|
|
|
@ -4,15 +4,17 @@ mod assets;
|
|||
mod stories;
|
||||
mod story_selector;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use clap::Parser;
|
||||
use dialoguer::FuzzySelect;
|
||||
use gpui::{
|
||||
div, px, size, AnyView, AppContext, Bounds, Render, ViewContext, VisualContext, WindowBounds,
|
||||
WindowOptions,
|
||||
};
|
||||
use isahc_http_client::IsahcHttpClient;
|
||||
use log::LevelFilter;
|
||||
use project::Project;
|
||||
use reqwest_client::ReqwestClient;
|
||||
use settings::{KeymapFile, Settings};
|
||||
use simplelog::SimpleLogger;
|
||||
use strum::IntoEnumIterator;
|
||||
|
@ -66,8 +68,8 @@ fn main() {
|
|||
gpui::App::new().with_assets(Assets).run(move |cx| {
|
||||
load_embedded_fonts(cx).unwrap();
|
||||
|
||||
let http_client = IsahcHttpClient::new(None, Some("zed_storybook".to_string()));
|
||||
cx.set_http_client(http_client);
|
||||
let http_client = ReqwestClient::user_agent("zed_storybook").unwrap();
|
||||
cx.set_http_client(Arc::new(http_client));
|
||||
|
||||
settings::init(cx);
|
||||
theme::init(theme::LoadThemes::All(Box::new(Assets)), cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue