set useragent header

This commit is contained in:
mxve 2023-11-07 17:14:40 +01:00
parent 4763759997
commit 5ed9fd4710

View File

@ -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)))?;