From 3f6de0350bbc5b7dd0c28652c6806f5b6a11ff8c Mon Sep 17 00:00:00 2001 From: mxve <68632137+mxve@users.noreply.github.com> Date: Tue, 7 Nov 2023 17:14:40 +0100 Subject: [PATCH] set useragent header --- src/http_async.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/http_async.rs b/src/http_async.rs index ce977e4..7f45b8e 100644 --- a/src/http_async.rs +++ b/src/http_async.rs @@ -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)))?;