Skip to content

Commit

Permalink
Set user agent
Browse files Browse the repository at this point in the history
Fixes #345
  • Loading branch information
Morganamilo committed Apr 28, 2021
1 parent 193ea6b commit 841ebb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/config.rs
Expand Up @@ -580,8 +580,11 @@ impl Config {
"failed to initialize noconfirm"
);

let ver = option_env!("PARU_VERSION").unwrap_or(env!("CARGO_PKG_VERSION"));

let client = reqwest::Client::builder()
.tcp_keepalive(Duration::new(15, 0))
.user_agent(format!("paru/{}", ver))
.build()?;
self.raur = raur::Handle::new_with_settings(client, self.aur_url.join("rpc")?.as_str());

Expand Down

0 comments on commit 841ebb5

Please sign in to comment.