Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

Don't crash if the operation times out. #1

Merged
merged 1 commit into from Jul 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions ReadingLister/ReadingLister/ViewController.swift
Expand Up @@ -37,6 +37,11 @@ class ViewController: NSViewController {
let request = NSURLRequest(URL: URLComponents!.URL!)

let task = session.dataTaskWithRequest(request) { (data, response, error) in
guard error == nil else {
print("ERROR: \(error!.localizedDescription)")
return
}

print(response)
let responseData = String(data: data!, encoding: NSUTF8StringEncoding)
print(responseData)
Expand Down