Exemple #1
0
        public async Task <string> GetWeather(string owmAPIKey, string idCity)
        {
            HttpResponseMessage response = await _httpUtil.GetAsync(APIs.GetWeather(owmAPIKey, idCity));

            if (response == null || !response.IsSuccessStatusCode)
            {
                return("{}");
            }

            string content = await response.Content.ReadAsStringAsync();

            return(content);
        }