提交 2bffaf1b 编写于 作者: J John Pope 提交者: Christian Noon

Added an optional bind around the response to safely extract headers.

上级 1b7b1f1a
......@@ -79,8 +79,10 @@ class DetailViewController: UITableViewController {
let end = CACurrentMediaTime()
self.elapsedTime = end - start
for (field, value) in response!.allHeaderFields {
self.headers["\(field)"] = "\(value)"
if let response = response {
for (field, value) in response.allHeaderFields {
self.headers["\(field)"] = "\(value)"
}
}
if let segueIdentifier = self.segueIdentifier {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册