title: session.dataTask not working Swift
body: <p>I have a method which retrieves data from an API request:</p>
  
  <pre><code>    let session = URLSession.shared
      let url = URL(string: "http://eventregistry.org/json/article?conceptUri=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FAfghanistan&amp;lang=eng&amp;action=getArticles&amp;articlesSortBy=date&amp;resultType=articles")!
  
      let task = session.dataTask(with: url) { (data, _, _) -&gt; Void in
          if let data = data {
              print(JSON(data: data))
              completion()
          }
      }
      task.resume()
  </code></pre>
  
  <p>The link works perfectly when accessing through a browser, however when debugging line by line in XCode, none of the code within the let task = session.dataTask is executed and so the print is not printed within the log.</p>
  
  <p>I am running through emulator and my laptop has internet, im just not sure why this is not working. </p>
  
  <p>Does anyone understand why?</p>