set useragent header
This commit is contained in:
parent
73c45de4be
commit
3f6de0350b
@ -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)))?;
|
||||
|
Loading…
Reference in New Issue
Block a user