Skip to content

Commit

Permalink
set useragent header
Browse files Browse the repository at this point in the history
  • Loading branch information
mxve committed Nov 7, 2023
1 parent 73c45de commit 3f6de03
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/http_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ pub async fn download_file(
) -> Result<(), String> {
let res = client
.get(url)
.header(
"User-Agent",
&format!(
"AlterWare Launcher | github.com/{}/{}",
crate::global::GH_OWNER,
crate::global::GH_REPO
),
)
.send()
.await
.or(Err(format!("Failed to GET from '{}'", &url)))?;
Expand Down

0 comments on commit 3f6de03

Please sign in to comment.