public IHttpActionResult GetWeatherFiveDay(string city) { WeatherForecast wf = new WeatherForecast(); StringBuilder sb = new StringBuilder(); string appid = "1bb6ee2cddff58ee3da8c24b28824471"; string type = "forecast"; for (int i = 0; i < wf.GetWeatherForFiveDays(city, appid, type).Count; i++) { sb.Append(" Date -" + wf.GetWeatherForFiveDays(city, appid, type)[i++]); sb.Append(" Max Temp " + wf.GetWeatherForFiveDays(city, appid, type)[i++]); sb.Append(" Min Temp " + wf.GetWeatherForFiveDays(city, appid, type)[i++]); sb.Append(" Speed " + wf.GetWeatherForFiveDays(city, appid, type)[i++]); } return(Ok(sb.ToString().Replace('"', ' '))); }