This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Uncomment both lines below if testing on an Xcode playground. | |
//import XCPlayground | |
//XCPSetExecutionShouldContinueIndefinitely() | |
let url = NSURL(string: "http://www.stackoverflow.com") | |
let task = NSURLSession.sharedSession().dataTaskWithURL(url) {(data, response, error) in | |
println(NSString(data: data, encoding: NSUTF8StringEncoding)) | |
} |