Provide user agent when performing HTTP requests (#15470)

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2024-07-30 11:12:37 +02:00 committed by GitHub
parent 2a649fa824
commit fa19bc98ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 40 additions and 24 deletions

View file

@ -114,7 +114,7 @@ impl App {
Self(AppContext::new(
current_platform(false),
Arc::new(()),
http_client::client(None),
http_client::client(None, None),
))
}
@ -125,7 +125,7 @@ impl App {
Self(AppContext::new(
current_platform(true),
Arc::new(()),
http_client::client(None),
http_client::client(None, None),
))
}
@ -667,7 +667,7 @@ impl AppContext {
}
/// Updates the http client assigned to GPUI
pub fn update_http_client(&mut self, new_client: Arc<dyn HttpClient>) {
pub fn set_http_client(&mut self, new_client: Arc<dyn HttpClient>) {
self.http_client = new_client;
}