Update http crate name (#15041)

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-07-23 15:01:05 -07:00 committed by GitHub
parent d36ebc8c74
commit 855048041d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
89 changed files with 184 additions and 180 deletions

102
Cargo.lock generated
View File

@ -248,7 +248,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.28",
"http 0.1.0",
"http_client",
"isahc",
"schemars",
"serde",
@ -392,7 +392,7 @@ dependencies = [
"gpui",
"heed",
"html_to_markdown 0.1.0",
"http 0.1.0",
"http_client",
"indexed_docs",
"indoc",
"language",
@ -955,7 +955,7 @@ dependencies = [
"db",
"editor",
"gpui",
"http 0.1.0",
"http_client",
"isahc",
"log",
"markdown_preview",
@ -1876,7 +1876,7 @@ dependencies = [
"fs",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"language",
"live_kit_client",
"log",
@ -2104,7 +2104,7 @@ dependencies = [
"collections",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"language",
"log",
"rand 0.8.5",
@ -2315,8 +2315,7 @@ dependencies = [
"fs",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"isahc",
"http_client",
"lazy_static",
"log",
"once_cell",
@ -2434,7 +2433,7 @@ dependencies = [
"gpui",
"headless",
"hex",
"http 0.1.0",
"http_client",
"indoc",
"language",
"language_model",
@ -2507,7 +2506,7 @@ dependencies = [
"futures 0.3.28",
"fuzzy",
"gpui",
"http 0.1.0",
"http_client",
"language",
"lazy_static",
"menu",
@ -2704,7 +2703,7 @@ dependencies = [
"fs",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"indoc",
"language",
"lsp",
@ -3537,7 +3536,7 @@ dependencies = [
"fuzzy",
"git",
"gpui",
"http 0.1.0",
"http_client",
"indoc",
"itertools 0.11.0",
"language",
@ -3860,7 +3859,7 @@ dependencies = [
"fs",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"indexed_docs",
"isahc",
"language",
@ -3901,7 +3900,7 @@ dependencies = [
"env_logger",
"extension",
"fs",
"http 0.1.0",
"http_client",
"language",
"log",
"rpc",
@ -4019,7 +4018,7 @@ dependencies = [
"editor",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"human_bytes",
"isahc",
"language",
@ -4624,7 +4623,7 @@ dependencies = [
"derive_more",
"git2",
"gpui",
"http 0.1.0",
"http_client",
"lazy_static",
"log",
"parking_lot",
@ -4664,7 +4663,7 @@ dependencies = [
"futures 0.3.28",
"git",
"gpui",
"http 0.1.0",
"http_client",
"isahc",
"pretty_assertions",
"regex",
@ -4748,7 +4747,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.28",
"http 0.1.0",
"http_client",
"serde",
"serde_json",
]
@ -4818,7 +4817,7 @@ dependencies = [
"foreign-types 0.5.0",
"futures 0.3.28",
"gpui_macros",
"http 0.1.0",
"http_client",
"image",
"itertools 0.11.0",
"lazy_static",
@ -5180,21 +5179,6 @@ dependencies = [
"regex",
]
[[package]]
name = "http"
version = "0.1.0"
dependencies = [
"anyhow",
"derive_more",
"futures 0.3.28",
"futures-lite 1.13.0",
"isahc",
"log",
"serde",
"serde_json",
"url",
]
[[package]]
name = "http"
version = "0.2.9"
@ -5234,6 +5218,22 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f"
[[package]]
name = "http_client"
version = "0.1.0"
dependencies = [
"anyhow",
"derive_more",
"futures 0.3.28",
"futures-lite 1.13.0",
"http 1.0.0",
"isahc",
"log",
"serde",
"serde_json",
"url",
]
[[package]]
name = "httparse"
version = "1.8.0"
@ -5437,7 +5437,7 @@ dependencies = [
"gpui",
"heed",
"html_to_markdown 0.1.0",
"http 0.1.0",
"http_client",
"indexmap 1.9.3",
"indoc",
"parking_lot",
@ -5877,7 +5877,7 @@ dependencies = [
"git",
"globset",
"gpui",
"http 0.1.0",
"http_client",
"indoc",
"itertools 0.11.0",
"lazy_static",
@ -5929,7 +5929,7 @@ dependencies = [
"feature_flags",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"language",
"log",
"menu",
@ -6004,7 +6004,7 @@ dependencies = [
"feature_flags",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"language",
"lazy_static",
"log",
@ -6771,7 +6771,7 @@ dependencies = [
"async-trait",
"async_zip",
"futures 0.3.28",
"http 0.1.0",
"http_client",
"log",
"paths",
"semver",
@ -7110,7 +7110,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.28",
"http 0.1.0",
"http_client",
"isahc",
"schemars",
"serde",
@ -7181,7 +7181,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.28",
"http 0.1.0",
"http_client",
"isahc",
"schemars",
"serde",
@ -7986,7 +7986,7 @@ dependencies = [
"git2",
"globset",
"gpui",
"http 0.1.0",
"http_client",
"itertools 0.11.0",
"language",
"log",
@ -8631,7 +8631,7 @@ dependencies = [
"fs",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"language",
"log",
"node_runtime",
@ -8679,7 +8679,7 @@ dependencies = [
"env_logger",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"image",
"language",
"log",
@ -9438,7 +9438,7 @@ dependencies = [
"futures-batch",
"gpui",
"heed",
"http 0.1.0",
"http_client",
"language",
"languages",
"log",
@ -10395,7 +10395,7 @@ dependencies = [
"env_logger",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"language",
"log",
"postage",
@ -10417,7 +10417,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"futures 0.3.28",
"http 0.1.0",
"http_client",
"paths",
"serde",
"serde_json",
@ -10827,7 +10827,7 @@ dependencies = [
"ctor",
"env_logger",
"gpui",
"http 0.1.0",
"http_client",
"lazy_static",
"log",
"parking_lot",
@ -11093,7 +11093,7 @@ dependencies = [
"extensions_ui",
"feedback",
"gpui",
"http 0.1.0",
"http_client",
"notifications",
"pretty_assertions",
"project",
@ -13320,7 +13320,7 @@ dependencies = [
"fs",
"futures 0.3.28",
"gpui",
"http 0.1.0",
"http_client",
"itertools 0.11.0",
"language",
"lazy_static",
@ -13357,7 +13357,7 @@ dependencies = [
"git",
"git2",
"gpui",
"http 0.1.0",
"http_client",
"ignore",
"language",
"log",
@ -13646,7 +13646,7 @@ dependencies = [
"go_to_line",
"gpui",
"headless",
"http 0.1.0",
"http_client",
"image_viewer",
"inline_completion_button",
"install_cli",

View File

@ -44,7 +44,7 @@ members = [
"crates/gpui_macros",
"crates/headless",
"crates/html_to_markdown",
"crates/http",
"crates/http_client",
"crates/image_viewer",
"crates/indexed_docs",
"crates/inline_completion_button",
@ -167,6 +167,7 @@ assets = { path = "crates/assets" }
assistant = { path = "crates/assistant" }
assistant_slash_command = { path = "crates/assistant_slash_command" }
assistant_tooling = { path = "crates/assistant_tooling" }
async-tungstenite = { version = "0.23" }
audio = { path = "crates/audio" }
auto_update = { path = "crates/auto_update" }
breadcrumbs = { path = "crates/breadcrumbs" }
@ -203,7 +204,7 @@ gpui = { path = "crates/gpui" }
gpui_macros = { path = "crates/gpui_macros" }
headless = { path = "crates/headless" }
html_to_markdown = { path = "crates/html_to_markdown" }
http = { path = "crates/http" }
http_client = { path = "crates/http_client" }
image_viewer = { path = "crates/image_viewer" }
indexed_docs = { path = "crates/indexed_docs" }
inline_completion_button = { path = "crates/inline_completion_button" }

View File

@ -18,7 +18,7 @@ path = "src/anthropic.rs"
[dependencies]
anyhow.workspace = true
futures.workspace = true
http.workspace = true
http_client.workspace = true
isahc.workspace = true
schemars = { workspace = true, optional = true }
serde.workspace = true

View File

@ -1,6 +1,6 @@
use anyhow::{anyhow, Result};
use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt};
use http::{AsyncBody, HttpClient, Method, Request as HttpRequest};
use http_client::{AsyncBody, HttpClient, Method, Request as HttpRequest};
use isahc::config::Configurable;
use serde::{Deserialize, Serialize};
use std::{convert::TryFrom, time::Duration};

View File

@ -41,7 +41,7 @@ fuzzy.workspace = true
gpui.workspace = true
heed.workspace = true
html_to_markdown.workspace = true
http.workspace = true
http_client.workspace = true
indexed_docs.workspace = true
indoc.workspace = true
language.workspace = true

View File

@ -10,7 +10,7 @@ use assistant_slash_command::{
use futures::AsyncReadExt;
use gpui::{AppContext, Task, WeakView};
use html_to_markdown::{convert_html_to_markdown, markdown, TagHandler};
use http::{AsyncBody, HttpClient, HttpClientWithUrl};
use http_client::{AsyncBody, HttpClient, HttpClientWithUrl};
use language::LspAdapterDelegate;
use ui::prelude::*;
use workspace::Workspace;

View File

@ -18,7 +18,7 @@ client.workspace = true
db.workspace = true
editor.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
isahc.workspace = true
log.workspace = true
markdown_preview.workspace = true

View File

@ -20,7 +20,7 @@ use smol::{fs, io::AsyncReadExt};
use settings::{Settings, SettingsSources, SettingsStore};
use smol::{fs::File, process::Command};
use http::{HttpClient, HttpClientWithUrl};
use http_client::{HttpClient, HttpClientWithUrl};
use release_channel::{AppCommitSha, AppVersion, ReleaseChannel};
use std::{
env::{

View File

@ -51,4 +51,4 @@ language = { workspace = true, features = ["test-support"] }
live_kit_client = { workspace = true, features = ["test-support"] }
project = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }

View File

@ -40,4 +40,4 @@ rpc = { workspace = true, features = ["test-support"] }
client = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }

View File

@ -4,7 +4,7 @@ use super::*;
use client::{test::FakeServer, Client, UserStore};
use clock::FakeSystemClock;
use gpui::{AppContext, Context, Model, SemanticVersion, TestAppContext};
use http::FakeHttpClient;
use http_client::FakeHttpClient;
use rpc::proto::{self};
use settings::SettingsStore;

View File

@ -18,7 +18,7 @@ test-support = ["clock/test-support", "collections/test-support", "gpui/test-sup
[dependencies]
anyhow.workspace = true
async-recursion = "0.3"
async-tungstenite = { version = "0.23", features = ["async-std", "async-native-tls"] }
async-tungstenite = { workspace = true, features = ["async-std", "async-native-tls"] }
chrono = { workspace = true, features = ["serde"] }
clock.workspace = true
collections.workspace = true
@ -26,7 +26,7 @@ feature_flags.workspace = true
fs.workspace = true
futures.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
lazy_static.workspace = true
log.workspace = true
once_cell.workspace = true
@ -60,12 +60,11 @@ gpui = { workspace = true, features = ["test-support"] }
rpc = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }
[target.'cfg(target_os = "windows")'.dependencies]
windows.workspace = true
[target.'cfg(target_os = "macos")'.dependencies]
cocoa.workspace = true
isahc = { workspace = true, features = ["static-curl"] }
async-native-tls = { version = "0.5.0", features = ["vendored"] }

View File

@ -20,7 +20,7 @@ use futures::{
use gpui::{
actions, AnyModel, AnyWeakModel, AppContext, AsyncAppContext, Global, Model, Task, WeakModel,
};
use http::{HttpClient, HttpClientWithUrl};
use http_client::{AsyncBody, HttpClient, HttpClientWithUrl};
use lazy_static::lazy_static;
use parking_lot::RwLock;
use postage::watch;
@ -233,7 +233,7 @@ pub enum EstablishConnectionError {
#[error("{0}")]
Other(#[from] anyhow::Error),
#[error("{0}")]
Http(#[from] http::Error),
Http(#[from] http_client::Error),
#[error("{0}")]
Io(#[from] std::io::Error),
#[error("{0}")]
@ -1351,7 +1351,7 @@ impl Client {
let mut url = self.rpc_url(http.clone(), None).await?;
url.set_path("/user");
url.set_query(Some(&format!("github_login={login}")));
let request = Request::get(url.as_str())
let request: http_client::Request<AsyncBody> = Request::get(url.as_str())
.header("Authorization", format!("token {api_token}"))
.body("".into())?;
@ -1783,7 +1783,7 @@ mod tests {
use clock::FakeSystemClock;
use gpui::{BackgroundExecutor, Context, TestAppContext};
use http::FakeHttpClient;
use http_client::FakeHttpClient;
use parking_lot::Mutex;
use proto::TypedEnvelope;
use settings::SettingsStore;

View File

@ -6,7 +6,7 @@ use clock::SystemClock;
use collections::{HashMap, HashSet};
use futures::Future;
use gpui::{AppContext, BackgroundExecutor, Task};
use http::{self, HttpClient, HttpClientWithUrl, Method};
use http_client::{self, HttpClient, HttpClientWithUrl, Method};
use once_cell::sync::Lazy;
use parking_lot::Mutex;
use release_channel::ReleaseChannel;
@ -632,7 +632,7 @@ impl Telemetry {
let checksum = calculate_json_checksum(&json_bytes).unwrap_or("".to_string());
let request = http::Request::builder()
let request = http_client::Request::builder()
.method(Method::POST)
.uri(
this.http_client
@ -661,7 +661,7 @@ mod tests {
use chrono::TimeZone;
use clock::FakeSystemClock;
use gpui::TestAppContext;
use http::FakeHttpClient;
use http_client::FakeHttpClient;
#[gpui::test]
fn test_telemetry_flush_on_max_queue_size(cx: &mut TestAppContext) {

View File

@ -20,7 +20,7 @@ test-support = ["sqlite"]
[dependencies]
anthropic.workspace = true
anyhow.workspace = true
async-tungstenite = "0.23"
async-tungstenite.workspace = true
aws-config = { version = "1.1.5" }
aws-sdk-s3 = { version = "1.15.0" }
axum = { version = "0.6", features = ["json", "headers", "ws"] }
@ -35,7 +35,7 @@ envy = "0.4.2"
futures.workspace = true
google_ai.workspace = true
hex.workspace = true
http.workspace = true
http_client.workspace = true
live_kit_server.workspace = true
log.workspace = true
nanoid.workspace = true

View File

@ -42,7 +42,7 @@ use futures::{
stream::FuturesUnordered,
FutureExt, SinkExt, StreamExt, TryStreamExt,
};
use http::IsahcHttpClient;
use http_client::IsahcHttpClient;
use prometheus::{register_int_gauge, IntGauge};
use rpc::{
proto::{

View File

@ -19,7 +19,7 @@ use fs::FakeFs;
use futures::{channel::oneshot, StreamExt as _};
use git::GitHostingProviderRegistry;
use gpui::{BackgroundExecutor, Context, Model, Task, TestAppContext, View, VisualTestContext};
use http::FakeHttpClient;
use http_client::FakeHttpClient;
use language::LanguageRegistry;
use node_runtime::FakeNodeRuntime;
use notifications::NotificationStore;

View File

@ -25,7 +25,7 @@ test-support = [
"settings/test-support",
"util/test-support",
"workspace/test-support",
"http/test-support",
"http_client/test-support",
]
[dependencies]
@ -80,5 +80,5 @@ rpc = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
tree-sitter-markdown.workspace = true
util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }

View File

@ -32,7 +32,7 @@ command_palette_hooks.workspace = true
editor.workspace = true
futures.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
language.workspace = true
lsp.workspace = true
menu.workspace = true
@ -65,4 +65,4 @@ rpc = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
theme = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }

View File

@ -12,8 +12,8 @@ use gpui::{
actions, AppContext, AsyncAppContext, Context, Entity, EntityId, EventEmitter, Global, Model,
ModelContext, Task, WeakModel,
};
use http::github::latest_github_release;
use http::HttpClient;
use http_client::github::latest_github_release;
use http_client::HttpClient;
use language::{
language_settings::{all_language_settings, language_settings, InlineCompletionProvider},
point_from_lsp, point_to_lsp, Anchor, Bias, Buffer, BufferSnapshot, Language, PointUtf16,
@ -393,7 +393,7 @@ impl Copilot {
Default::default(),
cx.to_async(),
);
let http = http::FakeHttpClient::create(|_| async { unreachable!() });
let http = http_client::FakeHttpClient::create(|_| async { unreachable!() });
let node_runtime = FakeNodeRuntime::new();
let this = cx.new_model(|cx| Self {
server_id: LanguageServerId(0),

View File

@ -43,7 +43,7 @@ futures.workspace = true
fuzzy.workspace = true
git.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
indoc.workspace = true
itertools.workspace = true
language.workspace = true
@ -98,4 +98,4 @@ tree-sitter-typescript.workspace = true
unindent.workspace = true
util = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }

View File

@ -7,7 +7,7 @@ use git::{
parse_git_remote_url, GitHostingProvider, GitHostingProviderRegistry, Oid, PullRequest,
};
use gpui::{Model, ModelContext, Subscription, Task};
use http::HttpClient;
use http_client::HttpClient;
use language::{markdown, Bias, Buffer, BufferSnapshot, Edit, LanguageRegistry, ParsedMarkdown};
use multi_buffer::MultiBufferRow;
use project::{Item, Project};

View File

@ -27,7 +27,7 @@ collections.workspace = true
fs.workspace = true
futures.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
indexed_docs.workspace = true
isahc.workspace = true
language.workspace = true

View File

@ -6,7 +6,7 @@ use async_compression::futures::bufread::GzipDecoder;
use async_tar::Archive;
use futures::io::BufReader;
use futures::AsyncReadExt;
use http::{self, AsyncBody, HttpClient};
use http_client::{self, AsyncBody, HttpClient};
use serde::Deserialize;
use std::{
env, fs, mem,

View File

@ -33,7 +33,7 @@ use gpui::{
actions, AppContext, AsyncAppContext, Context, EventEmitter, Global, Model, ModelContext, Task,
WeakModel,
};
use http::{AsyncBody, HttpClient, HttpClientWithUrl};
use http_client::{AsyncBody, HttpClient, HttpClientWithUrl};
use indexed_docs::{IndexedDocsRegistry, ProviderId};
use language::{
LanguageConfig, LanguageMatcher, LanguageQueries, LanguageRegistry, QUERY_FILENAME_PREFIXES,
@ -244,7 +244,7 @@ impl ExtensionStore {
installed_dir,
index_path,
builder: Arc::new(ExtensionBuilder::new(
http::client(http_client.proxy().cloned()),
::http_client::client(http_client.proxy().cloned()),
build_dir,
)),
outstanding_operations: Default::default(),

View File

@ -11,7 +11,7 @@ use collections::BTreeMap;
use fs::{FakeFs, Fs, RealFs};
use futures::{io::BufReader, AsyncReadExt, StreamExt};
use gpui::{Context, SemanticVersion, TestAppContext};
use http::{FakeHttpClient, Response};
use http_client::{FakeHttpClient, Response};
use indexed_docs::IndexedDocsRegistry;
use language::{LanguageMatcher, LanguageRegistry, LanguageServerBinaryStatus, LanguageServerName};
use node_runtime::FakeNodeRuntime;

View File

@ -13,7 +13,7 @@ use futures::{
Future, FutureExt, StreamExt as _,
};
use gpui::{AppContext, AsyncAppContext, BackgroundExecutor, Task};
use http::HttpClient;
use http_client::HttpClient;
use language::LanguageRegistry;
use node_runtime::NodeRuntime;
use release_channel::ReleaseChannel;

View File

@ -1,4 +1,5 @@
use crate::wasm_host::{wit::ToWasmtimeResult, WasmState};
use ::http_client::AsyncBody;
use ::settings::Settings;
use anyhow::{anyhow, bail, Context, Result};
use async_compression::futures::bufread::GzipDecoder;
@ -6,7 +7,6 @@ use async_tar::Archive;
use async_trait::async_trait;
use futures::AsyncReadExt;
use futures::{io::BufReader, FutureExt as _};
use http::AsyncBody;
use indexed_docs::IndexedDocsDatabase;
use language::{
language_settings::AllLanguageSettings, LanguageServerBinaryStatus, LspAdapterDelegate,
@ -209,8 +209,8 @@ impl nodejs::Host for WasmState {
#[async_trait]
impl lsp::Host for WasmState {}
impl From<http::github::GithubRelease> for github::GithubRelease {
fn from(value: http::github::GithubRelease) -> Self {
impl From<::http_client::github::GithubRelease> for github::GithubRelease {
fn from(value: ::http_client::github::GithubRelease) -> Self {
Self {
version: value.tag_name,
assets: value.assets.into_iter().map(Into::into).collect(),
@ -218,8 +218,8 @@ impl From<http::github::GithubRelease> for github::GithubRelease {
}
}
impl From<http::github::GithubReleaseAsset> for github::GithubReleaseAsset {
fn from(value: http::github::GithubReleaseAsset) -> Self {
impl From<::http_client::github::GithubReleaseAsset> for github::GithubReleaseAsset {
fn from(value: ::http_client::github::GithubReleaseAsset) -> Self {
Self {
name: value.name,
download_url: value.browser_download_url,
@ -235,7 +235,7 @@ impl github::Host for WasmState {
options: github::GithubReleaseOptions,
) -> wasmtime::Result<Result<github::GithubRelease, String>> {
maybe!(async {
let release = http::github::latest_github_release(
let release = ::http_client::github::latest_github_release(
&repo,
options.require_assets,
options.pre_release,
@ -254,9 +254,12 @@ impl github::Host for WasmState {
tag: String,
) -> wasmtime::Result<Result<github::GithubRelease, String>> {
maybe!(async {
let release =
http::github::get_release_by_tag_name(&repo, &tag, self.host.http_client.clone())
.await?;
let release = ::http_client::github::get_release_by_tag_name(
&repo,
&tag,
self.host.http_client.clone(),
)
.await?;
Ok(release.into())
})
.await

View File

@ -18,7 +18,7 @@ clap = { workspace = true, features = ["derive"] }
env_logger.workspace = true
extension = { workspace = true, features = ["no-webrtc"] }
fs.workspace = true
http.workspace = true
http_client.workspace = true
language.workspace = true
log.workspace = true
rpc.workspace = true

View File

@ -7,13 +7,13 @@ use std::{
};
use ::fs::{copy_recursive, CopyOptions, Fs, RealFs};
use ::http_client::HttpClientWithProxy;
use anyhow::{anyhow, bail, Context, Result};
use clap::Parser;
use extension::{
extension_builder::{CompileExtensionOptions, ExtensionBuilder},
ExtensionManifest,
};
use http::HttpClientWithProxy;
use language::LanguageConfig;
use theme::ThemeRegistry;
use tree_sitter::{Language, Query, WasmStore};

View File

@ -24,7 +24,7 @@ futures.workspace = true
gpui.workspace = true
human_bytes = "0.4.1"
isahc.workspace = true
http.workspace = true
http_client.workspace = true
language.workspace = true
log.workspace = true
menu.workspace = true

View File

@ -10,7 +10,7 @@ use gpui::{
div, rems, AppContext, DismissEvent, EventEmitter, FocusHandle, FocusableView, Model,
PromptLevel, Render, Task, View, ViewContext,
};
use http::HttpClient;
use http_client::HttpClient;
use isahc::Request;
use language::Buffer;
use project::Project;

View File

@ -19,7 +19,7 @@ collections.workspace = true
derive_more.workspace = true
git2.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
lazy_static.workspace = true
log.workspace = true
parking_lot.workspace = true

View File

@ -5,7 +5,7 @@ use async_trait::async_trait;
use collections::BTreeMap;
use derive_more::{Deref, DerefMut};
use gpui::{AppContext, Global};
use http::HttpClient;
use http_client::HttpClient;
use parking_lot::RwLock;
use url::Url;

View File

@ -17,7 +17,7 @@ async-trait.workspace = true
futures.workspace = true
git.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
isahc.workspace = true
regex.workspace = true
serde.workspace = true

View File

@ -3,7 +3,7 @@ use std::sync::Arc;
use anyhow::{bail, Context, Result};
use async_trait::async_trait;
use futures::AsyncReadExt;
use http::HttpClient;
use http_client::HttpClient;
use isahc::config::Configurable;
use isahc::{AsyncBody, Request};
use serde::Deserialize;

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, OnceLock};
use anyhow::{bail, Context, Result};
use async_trait::async_trait;
use futures::AsyncReadExt;
use http::HttpClient;
use http_client::HttpClient;
use isahc::config::Configurable;
use isahc::{AsyncBody, Request};
use regex::Regex;

View File

@ -11,6 +11,6 @@ path = "src/google_ai.rs"
[dependencies]
anyhow.workspace = true
futures.workspace = true
http.workspace = true
http_client.workspace = true
serde.workspace = true
serde_json.workspace = true

View File

@ -2,7 +2,7 @@ use std::sync::Arc;
use anyhow::{anyhow, Result};
use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt};
use http::HttpClient;
use http_client::HttpClient;
use serde::{Deserialize, Serialize};
pub const API_URL: &str = "https://generativelanguage.googleapis.com";

View File

@ -16,7 +16,7 @@ test-support = [
"backtrace",
"collections/test-support",
"util/test-support",
"http/test-support",
"http_client/test-support",
]
runtime_shaders = []
macos-blade = ["blade-graphics", "blade-macros", "blade-util", "bytemuck"]
@ -41,7 +41,7 @@ etagere = "0.2"
futures.workspace = true
font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "40391b7" }
gpui_macros.workspace = true
http.workspace = true
http_client.workspace = true
image = "0.25.1"
itertools.workspace = true
lazy_static.workspace = true
@ -79,7 +79,7 @@ waker-fn = "1.1.0"
backtrace = "0.3"
collections = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }
unicode-segmentation.workspace = true
[build-dependencies]

View File

@ -18,7 +18,7 @@ use smol::future::FutureExt;
pub use async_context::*;
use collections::{FxHashMap, FxHashSet, VecDeque};
pub use entity_map::*;
use http::{self, HttpClient};
use http_client::HttpClient;
pub use model_context::*;
#[cfg(any(test, feature = "test-support"))]
pub use test_context::*;
@ -114,7 +114,7 @@ impl App {
Self(AppContext::new(
current_platform(false),
Arc::new(()),
http::client(None),
http_client::client(None),
))
}
@ -125,7 +125,7 @@ impl App {
Self(AppContext::new(
current_platform(true),
Arc::new(()),
http::client(None),
http_client::client(None),
))
}

View File

@ -104,7 +104,7 @@ impl TestAppContext {
let foreground_executor = ForegroundExecutor::new(arc_dispatcher);
let platform = TestPlatform::new(background_executor.clone(), foreground_executor.clone());
let asset_source = Arc::new(());
let http_client = http::FakeHttpClient::with_404_response();
let http_client = http_client::FakeHttpClient::with_404_response();
let text_system = Arc::new(TextSystem::new(platform.text_system()));
Self {

View File

@ -13,7 +13,7 @@ use image::{ImageBuffer, ImageError};
#[cfg(target_os = "macos")]
use media::core_video::CVImageBuffer;
use http;
use http_client;
use thiserror::Error;
use util::ResultExt;
@ -413,7 +413,7 @@ impl Asset for Image {
pub enum ImageCacheError {
/// An error that occurred while fetching an image from a remote source.
#[error("http error: {0}")]
Client(#[from] http::Error),
Client(#[from] http_client::Error),
/// An error that occurred while reading the image from disk.
#[error("IO error: {0}")]
Io(Arc<std::io::Error>),
@ -423,7 +423,7 @@ pub enum ImageCacheError {
/// The URI of the image.
uri: SharedUri,
/// The HTTP status code.
status: http::StatusCode,
status: http_client::StatusCode,
/// The HTTP response body.
body: String,
},

View File

@ -11,7 +11,7 @@ use calloop_wayland_source::WaylandSource;
use collections::HashMap;
use filedescriptor::Pipe;
use http::Url;
use http_client::Url;
use smallvec::SmallVec;
use util::ResultExt;
use wayland_backend::client::ObjectId;

View File

@ -1,5 +1,5 @@
[package]
name = "http"
name = "http_client"
version = "0.1.0"
edition = "2021"
publish = false
@ -12,10 +12,11 @@ workspace = true
test-support = []
[lib]
path = "src/http.rs"
path = "src/http_client.rs"
doctest = true
[dependencies]
http = "1.0.0"
anyhow.workspace = true
derive_more.workspace = true
futures.workspace = true

View File

@ -22,7 +22,7 @@ fuzzy.workspace = true
gpui.workspace = true
heed.workspace = true
html_to_markdown.workspace = true
http.workspace = true
http_client.workspace = true
indexmap.workspace = true
parking_lot.workspace = true
paths.workspace = true

View File

@ -13,7 +13,7 @@ use async_trait::async_trait;
use collections::{HashSet, VecDeque};
use fs::Fs;
use futures::{AsyncReadExt, FutureExt};
use http::{AsyncBody, HttpClient, HttpClientWithUrl};
use http_client::{AsyncBody, HttpClient, HttpClientWithUrl};
use crate::{IndexedDocsDatabase, IndexedDocsProvider, PackageName, ProviderId};

View File

@ -35,7 +35,7 @@ fuzzy.workspace = true
git.workspace = true
globset.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
itertools.workspace = true
lazy_static.workspace = true
log.workspace = true
@ -84,4 +84,4 @@ tree-sitter-rust.workspace = true
tree-sitter-typescript.workspace = true
unindent.workspace = true
util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }

View File

@ -27,7 +27,7 @@ use collections::{HashMap, HashSet};
use futures::Future;
use gpui::{AppContext, AsyncAppContext, Model, SharedString, Task};
pub use highlight_map::HighlightMap;
use http::HttpClient;
use http_client::HttpClient;
use lazy_static::lazy_static;
use lsp::{CodeActionKind, LanguageServerBinary};
use parking_lot::Mutex;

View File

@ -29,7 +29,7 @@ editor.workspace = true
feature_flags.workspace = true
futures.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
menu.workspace = true
ollama = { workspace = true, features = ["schemars"] }
open_ai = { workspace = true, features = ["schemars"] }

View File

@ -7,7 +7,7 @@ use gpui::{
AnyView, AppContext, AsyncAppContext, FontStyle, Subscription, Task, TextStyle, View,
WhiteSpace,
};
use http::HttpClient;
use http_client::HttpClient;
use settings::{Settings, SettingsStore};
use std::{sync::Arc, time::Duration};
use strum::IntoEnumIterator;

View File

@ -8,7 +8,7 @@ use crate::{
LanguageModelProviderName, LanguageModelProviderState, LanguageModelRequest,
};
use gpui::{AnyView, AppContext, AsyncAppContext, Task};
use http::Result;
use http_client::Result;
use ui::WindowContext;
pub fn language_model_id() -> LanguageModelId {

View File

@ -1,7 +1,7 @@
use anyhow::{anyhow, Result};
use futures::{future::BoxFuture, stream::BoxStream, FutureExt, StreamExt};
use gpui::{AnyView, AppContext, AsyncAppContext, ModelContext, Subscription, Task};
use http::HttpClient;
use http_client::HttpClient;
use ollama::{get_models, stream_chat_completion, ChatMessage, ChatOptions, ChatRequest};
use settings::{Settings, SettingsStore};
use std::{sync::Arc, time::Duration};

View File

@ -6,7 +6,7 @@ use gpui::{
AnyView, AppContext, AsyncAppContext, FontStyle, Subscription, Task, TextStyle, View,
WhiteSpace,
};
use http::HttpClient;
use http_client::HttpClient;
use open_ai::{stream_completion, Request, RequestMessage};
use settings::{Settings, SettingsStore};
use std::{sync::Arc, time::Duration};

View File

@ -20,7 +20,7 @@ collections.workspace = true
feature_flags.workspace = true
futures.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
language.workspace = true
lazy_static.workspace = true
log.workspace = true

View File

@ -2,7 +2,7 @@ use anyhow::{anyhow, bail, Context, Result};
use async_trait::async_trait;
use futures::StreamExt;
use gpui::AsyncAppContext;
use http::github::{latest_github_release, GitHubLspBinaryVersion};
use http_client::github::{latest_github_release, GitHubLspBinaryVersion};
pub use language::*;
use lsp::LanguageServerBinary;
use project::project_settings::{BinarySettings, ProjectSettings};

View File

@ -2,7 +2,7 @@ use anyhow::{anyhow, Context, Result};
use async_trait::async_trait;
use futures::StreamExt;
use gpui::{AppContext, AsyncAppContext, Task};
use http::github::latest_github_release;
use http_client::github::latest_github_release;
pub use language::*;
use lazy_static::lazy_static;
use lsp::LanguageServerBinary;

View File

@ -6,7 +6,7 @@ use collections::HashMap;
use feature_flags::FeatureFlagAppExt;
use futures::StreamExt;
use gpui::{AppContext, AsyncAppContext};
use http::github::{latest_github_release, GitHubLspBinaryVersion};
use http_client::github::{latest_github_release, GitHubLspBinaryVersion};
use language::{LanguageRegistry, LanguageServerName, LspAdapter, LspAdapterDelegate};
use lsp::LanguageServerBinary;
use node_runtime::NodeRuntime;

View File

@ -3,7 +3,7 @@ use async_compression::futures::bufread::GzipDecoder;
use async_trait::async_trait;
use futures::{io::BufReader, StreamExt};
use gpui::{AppContext, AsyncAppContext};
use http::github::{latest_github_release, GitHubLspBinaryVersion};
use http_client::github::{latest_github_release, GitHubLspBinaryVersion};
pub use language::*;
use language_settings::all_language_settings;
use lazy_static::lazy_static;

View File

@ -4,7 +4,7 @@ use async_tar::Archive;
use async_trait::async_trait;
use collections::HashMap;
use gpui::AsyncAppContext;
use http::github::{build_tarball_url, GitHubLspBinaryVersion};
use http_client::github::{build_tarball_url, GitHubLspBinaryVersion};
use language::{LanguageServerName, LspAdapter, LspAdapterDelegate};
use lsp::{CodeActionKind, LanguageServerBinary};
use node_runtime::NodeRuntime;

View File

@ -22,7 +22,7 @@ async-tar.workspace = true
async-trait.workspace = true
async_zip.workspace = true
futures.workspace = true
http.workspace = true
http_client.workspace = true
log.workspace = true
paths.workspace = true
semver.workspace = true

View File

@ -5,7 +5,7 @@ pub use archive::extract_zip;
use async_compression::futures::bufread::GzipDecoder;
use async_tar::Archive;
use futures::AsyncReadExt;
use http::HttpClient;
use http_client::HttpClient;
use semver::Version;
use serde::Deserialize;
use smol::io::BufReader;

View File

@ -18,7 +18,7 @@ schemars = ["dep:schemars"]
[dependencies]
anyhow.workspace = true
futures.workspace = true
http.workspace = true
http_client.workspace = true
isahc.workspace = true
schemars = { workspace = true, optional = true }
serde.workspace = true

View File

@ -1,6 +1,6 @@
use anyhow::{anyhow, Context, Result};
use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt};
use http::{AsyncBody, HttpClient, Method, Request as HttpRequest};
use http_client::{AsyncBody, HttpClient, Method, Request as HttpRequest};
use isahc::config::Configurable;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

View File

@ -15,7 +15,7 @@ schemars = ["dep:schemars"]
[dependencies]
anyhow.workspace = true
futures.workspace = true
http.workspace = true
http_client.workspace = true
isahc.workspace = true
schemars = { workspace = true, optional = true }
serde.workspace = true

View File

@ -1,6 +1,6 @@
use anyhow::{anyhow, Context, Result};
use futures::{io::BufReader, stream::BoxStream, AsyncBufReadExt, AsyncReadExt, StreamExt};
use http::{AsyncBody, HttpClient, Method, Request as HttpRequest};
use http_client::{AsyncBody, HttpClient, Method, Request as HttpRequest};
use isahc::config::Configurable;
use serde::{Deserialize, Serialize};
use serde_json::{Map, Value};

View File

@ -37,7 +37,7 @@ fuzzy.workspace = true
git.workspace = true
globset.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
itertools.workspace = true
language.workspace = true
log.workspace = true

View File

@ -39,7 +39,7 @@ use gpui::{
AnyModel, AppContext, AsyncAppContext, BackgroundExecutor, BorrowAppContext, Context, Entity,
EventEmitter, Model, ModelContext, PromptLevel, SharedString, Task, WeakModel, WindowContext,
};
use http::{HttpClient, Url};
use http_client::{HttpClient, Url};
use itertools::Itertools;
use language::{
language_settings::{
@ -1120,7 +1120,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 = http::FakeHttpClient::with_404_response();
let http_client = http_client::FakeHttpClient::with_404_response();
let client = cx
.update(|cx| client::Client::new(clock, http_client.clone(), cx))
.unwrap();
@ -1164,7 +1164,7 @@ impl Project {
let languages = LanguageRegistry::test(cx.executor());
let clock = Arc::new(FakeSystemClock::default());
let http_client = http::FakeHttpClient::with_404_response();
let http_client = http_client::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| {

View File

@ -42,7 +42,7 @@ client = { workspace = true, features = ["test-support"] }
clock = { workspace = true, features = ["test-support"] }
fs = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }
language = { workspace = true, features = ["test-support"] }
node_runtime = { workspace = true, features = ["test-support"] }
remote = { workspace = true, features = ["test-support"] }

View File

@ -3,7 +3,7 @@ use client::{Client, UserStore};
use clock::FakeSystemClock;
use fs::{FakeFs, Fs as _};
use gpui::{Context, Model, TestAppContext};
use http::FakeHttpClient;
use http_client::FakeHttpClient;
use language::LanguageRegistry;
use node_runtime::FakeNodeRuntime;
use project::Project;

View File

@ -44,7 +44,7 @@ workspace.workspace = true
editor = { workspace = true, features = ["test-support"] }
env_logger.workspace = true
gpui = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }
language = { workspace = true, features = ["test-support"] }
project = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }

View File

@ -18,7 +18,7 @@ test-support = ["collections/test-support", "gpui/test-support", "proto/test-sup
[dependencies]
anyhow.workspace = true
async-tungstenite = "0.23"
async-tungstenite.workspace = true
base64.workspace = true
chrono.workspace = true
collections.workspace = true

View File

@ -30,7 +30,7 @@ gpui.workspace = true
language.workspace = true
log.workspace = true
heed.workspace = true
http.workspace = true
http_client.workspace = true
open_ai.workspace = true
parking_lot.workspace = true
project.workspace = true
@ -60,4 +60,4 @@ tempfile.workspace = true
util = { workspace = true, features = ["test-support"] }
worktree = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }

View File

@ -1,7 +1,7 @@
use client::Client;
use futures::channel::oneshot;
use gpui::App;
use http::HttpClientWithUrl;
use http_client::HttpClientWithUrl;
use language::language_settings::AllLanguageSettings;
use project::Project;
use semantic_index::{OpenAiEmbeddingModel, OpenAiEmbeddingProvider, SemanticIndex};

View File

@ -1,6 +1,6 @@
use anyhow::{Context as _, Result};
use futures::{future::BoxFuture, AsyncReadExt, FutureExt};
use http::HttpClient;
use http_client::HttpClient;
use serde::{Deserialize, Serialize};
use std::sync::Arc;

View File

@ -1,7 +1,7 @@
use crate::{Embedding, EmbeddingProvider, TextToEmbed};
use anyhow::Result;
use futures::{future::BoxFuture, FutureExt};
use http::HttpClient;
use http_client::HttpClient;
pub use open_ai::OpenAiEmbeddingModel;
use std::sync::Arc;

View File

@ -40,4 +40,4 @@ project = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
theme = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }

View File

@ -15,7 +15,7 @@ doctest = false
[dependencies]
anyhow.workspace = true
futures.workspace = true
http.workspace = true
http_client.workspace = true
paths.workspace = true
serde.workspace = true
serde_json.workspace = true

View File

@ -1,7 +1,7 @@
use anyhow::{anyhow, Context, Result};
use futures::io::BufReader;
use futures::{AsyncReadExt, Future};
use http::{AsyncBody, HttpClient, Request as HttpRequest};
use http_client::{AsyncBody, HttpClient, Request as HttpRequest};
use paths::supermaven_dir;
use serde::{Deserialize, Serialize};
use smol::fs::{self, File};

View File

@ -37,4 +37,4 @@ env_logger.workspace = true
gpui = { workspace = true, features = ["test-support"] }
rand.workspace = true
util = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }

View File

@ -21,7 +21,7 @@ test-support = [
"collections/test-support",
"editor/test-support",
"gpui/test-support",
"http/test-support",
"http_client/test-support",
"project/test-support",
"settings/test-support",
"util/test-support",
@ -61,7 +61,7 @@ client = { workspace = true, features = ["test-support"] }
collections = { workspace = true, features = ["test-support"] }
editor = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }
notifications = { workspace = true, features = ["test-support"] }
pretty_assertions.workspace = true
project = { workspace = true, features = ["test-support"] }

View File

@ -17,7 +17,7 @@ no-webrtc = ["call/no-webrtc"]
test-support = [
"call/test-support",
"client/test-support",
"http/test-support",
"http_client/test-support",
"db/test-support",
"project/test-support",
"session/test-support",
@ -40,7 +40,7 @@ derive_more.workspace = true
fs.workspace = true
futures.workspace = true
gpui.workspace = true
http.workspace = true
http_client.workspace = true
itertools.workspace = true
language.workspace = true
lazy_static.workspace = true
@ -73,4 +73,4 @@ gpui = { workspace = true, features = ["test-support"] }
project = { workspace = true, features = ["test-support"] }
session = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
http = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }

View File

@ -583,7 +583,7 @@ impl AppState {
let fs = fs::FakeFs::new(cx.background_executor().clone());
let languages = Arc::new(LanguageRegistry::test(cx.background_executor().clone()));
let clock = Arc::new(clock::FakeSystemClock::default());
let http_client = http::FakeHttpClient::with_404_response();
let http_client = http_client::FakeHttpClient::with_404_response();
let client = Client::new(clock, http_client.clone(), cx);
let session = Session::test();
let user_store = cx.new_model(|cx| UserStore::new(client.clone(), cx));

View File

@ -18,7 +18,7 @@ test-support = [
"settings/test-support",
"text/test-support",
"gpui/test-support",
"http/test-support",
"http_client/test-support",
]
[dependencies]
@ -52,7 +52,7 @@ collections = { workspace = true, features = ["test-support"] }
env_logger.workspace = true
git2.workspace = true
gpui = {workspace = true, features = ["test-support"]}
http.workspace = true
http_client.workspace = true
rand.workspace = true
settings = {workspace = true, features = ["test-support"]}
pretty_assertions.workspace = true

View File

@ -49,7 +49,7 @@ git_hosting_providers.workspace = true
go_to_line.workspace = true
gpui.workspace = true
headless.workspace = true
http.workspace = true
http_client.workspace = true
image_viewer.workspace = true
inline_completion_button.workspace = true
install_cli.workspace = true

View File

@ -4,10 +4,10 @@ use chrono::Utc;
use client::telemetry;
use db::kvp::KEY_VALUE_STORE;
use gpui::{AppContext, SemanticVersion};
use http::Method;
use http_client::Method;
use isahc::config::Configurable;
use http::{self, HttpClient, HttpClientWithUrl};
use http_client::{self, HttpClient, HttpClientWithUrl};
use paths::{crashes_dir, crashes_retired_dir};
use release_channel::ReleaseChannel;
use release_channel::RELEASE_CHANNEL;
@ -162,7 +162,7 @@ pub fn monitor_main_thread_hangs(
use parking_lot::Mutex;
use http::Method;
use http_client::Method;
use std::{
ffi::c_int,
sync::{mpsc, OnceLock},
@ -323,7 +323,7 @@ pub fn monitor_main_thread_hangs(
continue;
};
let Ok(request) = http::Request::builder()
let Ok(request) = http_client::Request::builder()
.method(Method::POST)
.uri(url.as_ref())
.header("x-zed-checksum", checksum)
@ -416,7 +416,7 @@ async fn upload_previous_panics(
continue;
};
let Ok(request) = http::Request::builder()
let Ok(request) = http_client::Request::builder()
.method(Method::POST)
.uri(panic_report_url.as_ref())
.header("x-zed-checksum", checksum)
@ -488,7 +488,7 @@ async fn upload_previous_crashes(
.await
.context("error reading crash file")?;
let mut request = http::Request::post(&crash_report_url.to_string())
let mut request = http_client::Request::post(&crash_report_url.to_string())
.redirect_policy(isahc::config::RedirectPolicy::Follow)
.header("Content-Type", "text/plain");