title: ContentsOfURL returns nil in swift 2.0 from a perfectly valid URL
body: <p>I am trying to fetch an image from a URL but the contentsOfURL method keeps returning nil. The url is legal and has only one image.
  I have tried the dispatch_get_global_queue method and also the method described below. The NSData value is always nil no matter how many times i run. i have already tried restarting the simulator as well. The network is also fast and there are no issues with the network.
  This is the part of the code that is failing</p>
  
  <pre><code>var imageURL : NSURL(string : "https://www.nasa.gov/sites/default/files/wave_earth_mosaic_3.jpg")
  
  if let url = imageURL{
          spinner?.startAnimating()
          let request = NSURLRequest(URL: url)
          let task = NSURLSession.sharedSession().dataTaskWithRequest(request){(data,response,error) -&gt; Void in
              self.imageData = NSData(contentsOfURL: url)
          }
              dispatch_async(dispatch_get_main_queue()){
                  if url == self.imageURL{
                      self.image = UIImage(data: self.imageData!)
                  }
                  else{
  
                  }
          }
          task.resume()
      }
  </code></pre>