commit changes

This commit is contained in:
Enstrayed
2025-04-08 15:45:20 -07:00
parent a4ea94e269
commit ff4f5a85d9
13 changed files with 175 additions and 25 deletions

View File

@@ -6,6 +6,7 @@ using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Runtime.InteropServices.WindowsRuntime;
using APIToolkit.Classes;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
@@ -31,9 +32,6 @@ namespace APIToolkit
this.SetTitleBar(AppTitleBar);
ContentArea.Navigate(typeof(URLShortener)); // Set default page
GlobalMethods.WebRequest.BaseAddress = new Uri("https://enstrayed.com/api/"); // Set base address for web requests being made
GlobalMethods.WebRequest.DefaultRequestHeaders.UserAgent.ParseAdd($"DotNet/{Environment.Version} APIToolkit/{GlobalMethods.Version}"); // Set user agent of client
}
private void NavigationView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
@@ -57,10 +55,6 @@ namespace APIToolkit
}
}
public static class GlobalMethods
{
public static HttpClient WebRequest = new();
public static string Version = "1.0";
}
}