using System.Net.Http; using System.Text.Json; using System.Text.Json.Serialization; using System.Threading.Tasks; namespace SockChatKeepAlive { public class FutamiCommon { [JsonPropertyName("ping")] public int Ping { get; set; } [JsonPropertyName("uiharu")] public string Metadata { get; set; } [JsonPropertyName("eeprom")] public string Uploads { get; set; } [JsonPropertyName("servers")] public string[] Servers { get; set; } public static async Task FetchAsync(HttpClient client, string host) { return JsonSerializer.Deserialize( await client.GetByteArrayAsync(host + "/common.json") ); } } }