From 7c5b2b8ecf953ff6b03b6f335d280284b703e6e2 Mon Sep 17 00:00:00 2001 From: Eva Luna Date: Sun, 12 May 2024 01:16:01 -0400 Subject: [PATCH] Add custom user-agent for Refresher client --- Refresher/UI/PatchForm.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Refresher/UI/PatchForm.cs b/Refresher/UI/PatchForm.cs index a10ec67..deff839 100644 --- a/Refresher/UI/PatchForm.cs +++ b/Refresher/UI/PatchForm.cs @@ -155,6 +155,7 @@ private void AutoDiscover(object? sender, EventArgs arg) { using HttpClient client = new(); client.BaseAddress = autodiscoverUri; + client.DefaultRequestHeaders.UserAgent.ParseAdd("Refresher/3"); HttpResponseMessage response = client.GetAsync("/autodiscover").Result; response.EnsureSuccessStatusCode();