commit changes
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user