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

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Runtime.InteropServices.WindowsRuntime;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
@@ -33,6 +34,8 @@ namespace APIToolkit
public App()
{
this.InitializeComponent();
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
}
/// <summary>
@@ -47,4 +50,10 @@ namespace APIToolkit
private Window? m_window;
}
public static class GlobalMethods
{
public static HttpClient WebRequest = new();
public static string Version = "1.0";
}
}