Get the weather for cities with names that contain spaces using Openweathermap
<p>I am trying to get the weather for a city using <a href="http://openweathermap.org/" rel="nofollow">Openweathermap</a> using this code:</p>

<pre><code>func getWeatherByCity(city: String) {
    if let weatherRequestURL = NSURL(string: "\(openWeatherMapBaseURL)?APPID=\(openWeatherMapAPIKey)&amp;q=\(city)") {
        getWeather(weatherRequestURL: weatherRequestURL)
    }
}
</code></pre>

<p>(The full tutorial <a href="http://www.globalnerdy.com/2016/04/02/how-to-build-an-ios-weather-app-in-swift-part-1-a-very-bare-bones-weather-app/" rel="nofollow">http://www.globalnerdy.com/2016/04/02/how-to-build-an-ios-weather-app-in-swift-part-1-a-very-bare-bones-weather-app/</a>)</p>

<p>The api works fine with city names that don't contain spaces.</p>

<p>even on the home page <a href="http://openweathermap.org/" rel="nofollow">http://openweathermap.org/</a> , looking for san francisco gives no results.</p>

<p>What's missing here?</p>