Added UI Toolkit Progress

This commit is contained in:
CortexCore
2024-12-13 16:14:20 +08:00
parent 21b4f9091a
commit d502501b27
20 changed files with 660 additions and 134 deletions

View File

@@ -11,6 +11,10 @@ namespace BITKit
public static async UniTask<string> PostJsonAsync(this HttpClient self, string requestUrl, object value , CancellationToken cancellationToken=default)
{
var json = JsonConvert.SerializeObject(value);
if (value is string j)
{
json = j;
}
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response =await self.PostAsync(requestUrl, content, cancellationToken);
return await response.Content.ReadAsStringAsync();