public async Task <Clima> ObtenerClima() { try { ZipHttpClient client = new ZipHttpClient(UrlBase); var response = await client.HttpRequest(RequestString); if (!response.IsSuccessStatusCode) { throw new Exception(response.ReasonPhrase); } var responseContent = await response.Content.ReadAsStringAsync(); return(MapStringToClima(responseContent)); } catch (Exception) { return(null); } }
public void DisposeTest() { using var service = new ZipHttpClient(); service.Dispose(); }