Restore HTTP client transition, but use reqwest everywhere (#19055)

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-10-11 14:58:58 -07:00 committed by GitHub
parent c709b66f35
commit 22ac178f9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 838 additions and 418 deletions

View file

@ -18,14 +18,14 @@ clap = { workspace = true, features = ["derive"] }
env_logger.workspace = true
extension = { workspace = true, features = ["no-webrtc"] }
fs.workspace = true
isahc_http_client.workspace = true
language.workspace = true
log.workspace = true
reqwest_client.workspace = true
rpc.workspace = true
serde.workspace = true
serde_json.workspace = true
theme.workspace = true
tokio.workspace = true
tokio = { workspace = true, features = ["full"] }
toml.workspace = true
tree-sitter.workspace = true
wasmtime.workspace = true

View file

@ -13,8 +13,8 @@ use extension::{
extension_builder::{CompileExtensionOptions, ExtensionBuilder},
ExtensionManifest,
};
use isahc_http_client::IsahcHttpClient;
use language::LanguageConfig;
use reqwest_client::ReqwestClient;
use theme::ThemeRegistry;
use tree_sitter::{Language, Query, WasmStore};
@ -66,12 +66,7 @@ async fn main() -> Result<()> {
std::env::consts::OS,
std::env::consts::ARCH
);
let http_client = Arc::new(
IsahcHttpClient::builder()
.default_header("User-Agent", user_agent)
.build()
.map(IsahcHttpClient::from)?,
);
let http_client = Arc::new(ReqwestClient::user_agent(&user_agent)?);
let builder = ExtensionBuilder::new(http_client, scratch_dir);
builder