Provide user agent when performing HTTP requests (#15470)
Release Notes: - N/A --------- Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
parent
2a649fa824
commit
fa19bc98ac
8 changed files with 40 additions and 24 deletions
|
@ -60,7 +60,13 @@ async fn main() -> Result<()> {
|
|||
|
||||
log::info!("compiling extension");
|
||||
|
||||
let http_client = Arc::new(HttpClientWithProxy::new(None));
|
||||
let user_agent = format!(
|
||||
"Zed Extension CLI/{} ({}; {})",
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
std::env::consts::OS,
|
||||
std::env::consts::ARCH
|
||||
);
|
||||
let http_client = Arc::new(HttpClientWithProxy::new(Some(user_agent), None));
|
||||
let builder = ExtensionBuilder::new(http_client, scratch_dir);
|
||||
builder
|
||||
.compile_extension(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue