Stop leaking isahc assumption (#18408)
Users of our http_client crate knew they were interacting with isahc as they set its extensions on the request. This change adds our own equivalents for their APIs in preparation for changing the default http client. Release Notes: - N/A
This commit is contained in:
@@ -11,7 +11,6 @@ use gpui::{
|
||||
PromptLevel, Render, Task, View, ViewContext,
|
||||
};
|
||||
use http_client::HttpClient;
|
||||
use isahc::Request;
|
||||
use language::Buffer;
|
||||
use project::Project;
|
||||
use regex::Regex;
|
||||
@@ -299,7 +298,7 @@ impl FeedbackModal {
|
||||
is_staff: is_staff.unwrap_or(false),
|
||||
};
|
||||
let json_bytes = serde_json::to_vec(&request)?;
|
||||
let request = Request::post(feedback_endpoint)
|
||||
let request = http_client::http::Request::post(feedback_endpoint)
|
||||
.header("content-type", "application/json")
|
||||
.body(json_bytes.into())?;
|
||||
let mut response = http_client.send(request).await?;
|
||||
|
||||
Reference in New Issue
Block a user