title: I use wheaterapi.com and create url with init URL(string: urlString). link working with a browser but don't working with app. How to fix?
body: <p>I use wheaterapi.com and create url with init URL(string: urlString). If I use the received url in a browser, I can get valid answer, and get all data, but if I use url with my app I get error. How fix it?</p>
  
  <pre><code>func ferchFromServer(cityName: String) {
      let urlString = "https://api.weatherapi.com/v1/current.json?key=\(apikey!)&amp;q=\(cityName)"
      let url = URL(string: urlString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)
      print(url!)
      let session = URLSession(configuration: .default)
      let task = session.dataTask(with: url!) { (data, response, error) in
          if let receivedData = data {
              if let datas = self.parseJSON(data: receivedData){
                  self.delegate?.updateInterface(self, datas: datas)
              }
  
          }
      }
      task.resume()
  }
  </code></pre>
  
  <p><code>print(url)</code> > <code>https://api.weatherapi.com/v1/current.json?key=&lt;MYKEY&gt;&amp;q=New%20York</code> 
  its valid url and if entered it in a text field of browser, its work (instead MYKEY - my valid key)</p>
  
  <p>but app return > <code>The data couldn’t be read because it isn’t in the correct format.</code></p>
  
  <p>P.S. if I try use city from 1 word (for example Moscow of Stambul) code working and don't return this error</p>