Added UI Toolkit Progress
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user