title: NSData contentsOfURL constructor returns nil
body: <p>I'm trying to access an API I made in PHP. It works fine in browser, but I can't get this code to fetch any sort of data from any given webpage.</p>
  
  <pre><code>var jsonData: NSData = NSData(contentsOfURL: NSURL(string: "http://www.google.com"))
  let string1 = NSString(data: jsonData, encoding: NSUTF8StringEncoding)
  println(string1)
  </code></pre>
  
  <p>What am I doing wrong here? </p>
  
  <p>Update: Here's the output after changing encoding.</p>
  
  <p><img src="https://i.stack.imgur.com/LBWPm.png" alt="enter image description here"></p>
  
  <p>Also, NSURLConnection doesn't start when I do that either. Might be a related issue.</p>