namespace Bloxstrap.Utility
{
internal static class Http
{
///
/// Gets and deserializes a JSON API response to the specified object
///
///
///
///
///
public static async Task GetJson(string url)
{
var request = await App.HttpClient.GetAsync(url);
request.EnsureSuccessStatusCode();
string json = await request.Content.ReadAsStringAsync();
return JsonSerializer.Deserialize(json)!;
}
}
}